DOMParser
class in package klyn.io.xml.dom

    public class DOMParser extends Object:

Object
└ DOMParser

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

    import klyn.io.xml.dom

    parser = DOMParser()
    document = parser.parseFromString("<root><child id=\"1\">text</child></root>")
    print(document.documentElement.tagName)

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | DOMParser `DOMParser():` | Creates a DOM parser.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | parse `parse(source as InputSource) as DOMDocument throws IOException, DOMException:` | Parses XML from a SAX input source.
public | parseFromFile `parseFromFile(filePath as FilePath) as DOMDocument throws IOException, DOMException:` | Parses XML from a FilePath.
public | parseFromFile `parseFromFile(filePath as String) as DOMDocument throws IOException, DOMException:` | Parses XML from a file path.
public | parseFromString `parseFromString(xml as String) as DOMDocument throws DOMException:` | Parses XML from a string.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml