News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

Microsoft's XML Parser

Started by ben2ong2, October 05, 2006, 05:19:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ben2ong2

Microsoft's XML parser is a COM component that comes with Internet Explorer 5 and higher. Once you have installed Internet Explorer, the parser is available to scripts.
Microsoft's XML parser supports all the necessary functions to traverse the node tree, access the nodes and their attribute values, insert and delete nodes, and convert the node tree back to XML.
The following table lists the most commonly used node types supported by Microsoft's XML parser:
Node Type   Example
Processing instruction   <?xml version="1.0"?>
Element   <drink type="beer">Carlsberg</drink>
Attribute   type="beer"
Text   Carlsberg
MSXML Parser 2.5 is the XML parser that is shipped with Windows 2000 and IE 5.5.
MSXML Parser 3.0 is the XML parser that is shipped with IE 6.0 and Windows XP.
The MSXML 3.0 parser features:
·   JavaScript, VBScript, Perl, VB, Java, C++, etc. support
·   Complete XML support
·   Full DOM and Namespace support
·   DTD and validation
·   Complete XSLT and XPath support
·   SAX2 support
·   Server-safe HTTP
To create an instance of Microsoft's XML parser with JavaScript, use the following code:
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
To create an instance of Microsoft's XML parser with VBScript, use the following code:
set xmlDoc=CreateObject("Microsoft.XMLDOM")
To create an instance of Microsoft's XML parser in an ASP page (using VBScript), use the following code:
set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
The following code loads an existing XML document ("note.xml") into Microsoft's XML parser:
<script type="text/javascript">var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("note.xml").........</script>
The first line of the script above creates an instance of the Microsoft XML parser. The third line tells the parser to load an XML document called "note.xml". The second line turns off asynchronized loading, to make sure that the parser will not continue execution of the script before the document is fully loaded.

You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login