Unlimited web hosting - 238 CHAPTER 8 SCRIPTING IN THE BROWSER
238 CHAPTER 8 SCRIPTING IN THE BROWSER Examining Extra Functionality in MSXML Microsoft XML Parser (MSXML) 3, which ships with IE 6, provides some additional properties and methods that you can use with the DOM interfaces discussed previously. You ll see examples of some of these additions later, as well as how to create similar functionality in Mozilla. Let s start by looking at extensions to the Document and Node interfaces: Additions to the MSXML Document Interface MSXML includes the following additions to the Document interface: load() loadXML() readystate onreadystatechange() load(url) The load() method loads XML content from the URL argument: oDocument.load(”dvd.xml”); The loading happens asynchronously, which means that the method returns immediately and the parser loads the XML. As the content loads, it changes the value of the readystate property and raises the onreadystatechange event. The load() method is also part of the DOM Level 3 Save and Load module. Mozilla supports both this method and the async property from DOM Level 3. loadXML(xml) The loadXML()method loads XML string data into a Document object. When called, it loads asynchronously. The method is useful for using string manipulation to create XML in JavaScript. The following line loads some simple XML content into a DOM Document from a string: oDocument.loadXML(’
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.