parseFromString method

1 out of 1 rated this helpful - Rate this topic

Creates an instance of a document that contains a Document Object Model (DOM) tree from a string of serialized XML source.

Syntax

var retval = DOMParser.parseFromString(xmlSource, mimeType);

Parameters

xmlSource [in]

Type: String

A string that contains serialized XML source code.

mimeType [in]

Type: String

A string that identifies one of the following mime types for the source.

text/xml

application/xml

application/xhtml+xml

image/svg+xml

Return value

Type: IHTMLDocument2

A document object that represents the DOM tree of the XML source.

Standards information

There are no standards that apply here.

Remarks

To use the parseFromString method, type the following syntax.


oParser =  new DOMParser();
oDocument = oParser.parseFromString(xmlSource, mimeType);

See also

DOMParser

 

 

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.