You are here: Reference > JavaScript > client-side > xml handling > methods > parseFromStream (DOMParser)

parseFromStream method (DOMParser)

Browser support:
Creates an XMLDocument object from the specified byte stream.

Syntax:

object.parseFromStream (stream, charset, contentLength, mimeType);
You can find the related objects in the Supported by objects section below.

Parameters:

stream
Required. Specifies the byte stream to parse.
charset
Required. String that specifies the character set that was used to encode the byte stream.
contentLength
Required. Integer that specifies the length of the stream, in bytes.
mimeType
Required. String that specifies the content type of the stream.
One of the following values:
text/xml
Input format is XML.
application/xml
Input format is XML.
application/xhtml+xml
Input format is XML.

Return value:

Returns the created XMLDocument object.

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content