Ryan's District Boards

Computer, programming, and webmaster help , support , tips and tricks => Tutorials Zone! => Internet webmaster computer programming technology tips and tricks => XML Tutorials => Topic started by: ben2ong2 on October 05, 2006, 05:21:43 PM

Title: Loading XML Text Into the Parser
Post by: ben2ong2 on October 05, 2006, 05:21:43 PM
Internet Explorer supports two ways of loading XML into a document object: the load() method and the loadXML() method. The load() method loads an XML file and the loadXML() method loads a text string that contains XML code.
The following code loads a text string into Microsoft's XML parser:
<script type="text/javascript">var txt="<note>"txt=txt+"<to>Tove</to><from>Jani</from>"txt=txt+"<heading>Reminder</heading>"txt=txt+"<body>Don't forget me this weekend!</body>"txt=txt+"</note>"var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.loadXML(txt).........</script>
If you have Internet Explorer, you can try it yourself.