public class DOMParser extends Object:
DOM parser that reads XML into the pure Klyn XMLDocument implementation.
DOMParser is the high-level DOM entry point: it hides SAX callbacks and returns a ready-to-use document tree.
@example `klyn import klyn.io.xml.dom
parser = DOMParser() document = parser.parseFromString("<root><child id=\"1\">text</child></root>") print(document.documentElement.tagName)
| Modifier and Type | Member | Description |
|---|---|---|
| public | parseparse(source as InputSource) as DomDocument throws IOException, DOMException: |
Parses XML from a SAX input source. |
| public | parseFromFileparseFromFile(filePath as FilePath) as DomDocument throws IOException, DOMException: |
Parses XML from a FilePath. |
| public | parseFromFileparseFromFile(filePath as String) as DomDocument throws IOException, DOMException: |
Parses XML from a file path. |
| public | parseFromStringparseFromString(xml as String) as DomDocument throws DOMException: |
Parses XML from a string. |