Section 25.78. Document.loadXML( ): populate this Document by parsing a string of XML markup


25.78. Document.loadXML( ): populate this Document by parsing a string of XML markup

Internet Explorer:

25.78.1. Synopsis

 void loadXML(String text) 

25.78.1.1. Arguments

text

The XML markup to parse.

25.78.2. Description

This IE-specific method parses the specified string of XML text and builds a tree of DOM nodes in the current Document object, discarding any nodes that previously existed in the Document.

This method does not exist on Document objects that represent HTML documents. Before calling loadXML( ), you typically create a new, empty Document to hold the parsed content:

 var doc = new ActiveXObject("MSXML2.DOMDocument"); doc.loadXML(markup); 

See DOMParser.parseFromString( ) for a non-IE alternative.

25.78.3. See Also

DOMParser.parseFromString( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net