new DOMParser()
Methods
parseFromString(string, mimetypeopt)
Parses the XML source
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
string | string | XML source | |
mimetype | string | <optional> | Currently not used |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.4.2
Throws:
If source could not be parsed. Note: this behavior differs from the W3C DOM specification, which demands returning a document describing the error instead.