javascript|xml| generates the XML text as much as possible using all the actions and attributes to make a summary:
<script language= "JavaScript" > <!--var doc = new ActiveXObject ("Msxml2.domdocument"); Ie5.5+,createobject ("Microsoft.XMLDOM")//Loading document//doc.load ("B.xml"); Create file header var p = doc.createprocessinginstruction ("xml", "version= ' 1.0 '" encoding= ' gb2312 ' "); Add File Header Doc.appendchild (p); For direct loading, the root contact//var root = doc.documentelement is obtained; Two ways to create a root contact//var root = doc.createelement ("Students"); var root = Doc.createnode (1, "Students", ""); Create Child contacts var n = doc.createnode (1, "Ttyp", ""); Specifies the sub-contact Text//n.text = "This is a test"; Create Sun contact var o = doc.createelement ("Sex"); O.text = "male"; Specify its text//create attribute var r = doc.createattribute ("id"); r.value= "Test"; Add attribute N.setattributenode (r); Create a second property var r1 = Doc.createattribute ("class"); R1.value= "TT"; Add attribute N.setattributenode (R1); Deletes the second property N.removeattribute ("class"); Add Sun Contact N.appendChild (O); Adds a text contact N.appendchild ("This is a text node.") (Doc.createtextnode); Add Comment n.appendchild (doc.createcomment ("This is a comment\n")); Add a sub contact root.appendchild (n); Copy contact var m = N.clonenode (true); Root.appendchild (m); Delete Contact Root.removechild (root.childnodes (0)); Create data segment var c = doc.createcdatasection ("This is a CDATA"); C.text = "Hi,cdata"; Add a data Segment Root.appendchild (c); Add Root contact Doc.appendchild (root); Lookup contact var a = Doc.getelementsbytagname ("Ttyp"); var a = Doc.selectnodes ("//ttyp"); Displays the properties for the change point for (Var i= 0;i<a.length;i++) {alert (a[i].xml); for (Var j=0;j<a[i].attributes.length;j++) {alert (a[i].attributes[j].name); }//xml Save (required on the server, client with FSO)//doc.save (); View the root contact XML if (n) {alert (n.ownerdocument.xml); }//--> </script&Gt