XML Guide-Microsoft XML parser

Source: Internet
Author: User
Tags xml parser
    
The XML parser can read, update, create, and operate an XML document.
Use XML parser
Microsoft's XML parser is bundled with IE5.0 + browser.
Once IE5.0 is installed, the XML parser is obtained. In addition to being called by the browser, this browser can also be called in scripts or programs. This parser supports programming models unrelated to programming languages and supports the following technologies:
JavaScript, VBScript, Perl, VB, Java, C ++, etc.
W3C XML 1.0 and XML DOM
DTD and XML document verification
If the browser uses JavaScript as the scripting language, you can use the following code to create an XML document object:
Var xmlDoc = new ActiveXObject ("Microsoft. XMLDOM ")
If the browser uses VBScript as the script language, you can use the following code to create an XML document object:
Set xmlDoc = CreateObject ("Microsoft. XMLDOM ")
If you use the VBScript language in an ASP program, you can use the following code:
Set xmlDoc = Server. CreateObject ("Microsoft. XMLDOM ")

Load the XML document into the parser
You can use the script code to load the XML document into the parser.
The following code loads an XML document into the parser:
<Script type = "text/javascript">
Var xmlDoc = new ActiveXObject ("Microsoft. XMLDOM ")
XmlDoc. async = "false"
XmlDoc. load ("note. xml ")
// ...... Processing the document goes here
</Script>
The second line of code creates an instance of the Microsoft XML parser.
The third line of code disables asynchronous loading to ensure that the XML parser does not parse the XML file before fully loading the XML file.
The fourth line tells the parser that the name of the XML document to be loaded is note. xml.
Load pure XML documents into the parser by characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.