Package org.teavm.jso.dom.xml
Class DOMParser
java.lang.Object
org.teavm.jso.dom.xml.DOMParser
- All Implemented Interfaces:
org.teavm.jso.JSObject
The DOMParser interface provides the ability to parse XML or HTML source code from
a string into a DOM
Document
.-
Constructor Details
-
DOMParser
public DOMParser()
-
-
Method Details
-
create
Deprecated. -
parseFromString
Parses the given string.Note that if the parsing process fails, the DOMParser does not throw an exception, but instead returns an error document:
(error description) (a snippet of the source XML) - Parameters:
s
- The string to be parsed. It must contain either HTML, xml, xhtml+xml, or svg document.mimeType
- This string determines a class of the the method's return value. The possible values are the following: text/html, text/xml, application/xml, application/xhtml+xml, image/svg+xml- Returns:
- Newly created
Document
orHTMLDocument
-