In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "Microsoft xml parser sample analysis," the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "Microsoft xml parser sample analysis" this article bar.
use an XML parser
Microsoft's XML parser is bundled with the IE 5.0 + browser.
Once you install IE 5.0, you have an XML parser. This browser can be invoked from within the browser itself as well as from within scripts or programs. This parser is characterized by support for programming language-independent programming models, which support the following technologies:
JavaScript, VBScript, Perl, VB, Java, C++ and more
W3C XML 1.0 and XML DOM
DTDs and XML document validation
If your browser uses JavaScript as its scripting language, you can create an XML document object using the following code:
var xmlDoc=new ActiveXObject("Microsoft.XMLDOM")
If your browser uses VBScript as its scripting language, you can create XML document objects using the following code:
set xmlDoc=CreateObject("Microsoft.XMLDOM")
If you use VBScript in ASP programs, you can use the following code form:
set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
--------------------------------------------------------------------------------
Load XML documents into the parser
Use script code to load XML documents into the parser.
The following code loads an XML document into the parser:
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.load("note.xml")// ....... processing the document goes here
The second line of code creates an instance of the Microsoft XML parser.
The third line turns off asynchronous loading, ensuring that the XML parser does not parse the XML document until it is fully loaded.
The fourth line tells the parser that the XML document to load is named note.xml.
--------------------------------------------------------------------------------
Loading pure XML documents into the parser by character
The parser can load XML text from a text string.
The following code demonstrates loading a text string into the parser:
var text=""text=text+"ToveJani"text=text+"Reminder"text=text+"Don't forget me this weekend! "text=text+""var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")xmlDoc.async="false"xmlDoc.loadXML(text)// ....... processing the document goes here
Note that the string is loaded using the "loadXML()" method (instead of the "load()" method used earlier),"loadXML()" for loading strings, and "load()" for loading XML documents.
Above is "microsoft xml parser sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.