//demo1
varxmlDoc=newActiveXObject("Msxml2.DOMDocument");
varroot;
varCDATASection;
xmlDoc.async=false;
xmlDoc.loadXML("");
root=xmlDoc.documentElement;
CDATASection=xmlDoc.createCDATASection("HelloWorld!");
root.appendChild(CDATASection);
b=xmlDoc.createElement("Test")
b.text="hahahahaha"
root.appendChild(b);
alert(root.xml);
for(i=0;i
if(root.childNodes[i].nodeType==4)
alert(root.childNodes[i].nodeValue)
}
//demo2
varxmlDoc=newActiveXObject("Msxml2.DOMDocument");
xmlDoc.async=false;
xmlDoc.loadXML("");
root=xmlDoc.documentElement;
for(i=0;i
if(root.childNodes[i].nodeType==4)
alert(root.childNodes[i].nodeValue)
}
//demo3(forfirefox)
//demo4(crossbrower)
http://kb.mozillazine.org/XPath