Class DOMStreamReader

  • All Implemented Interfaces:
    NamespaceContext, XMLStreamConstants, XMLStreamReader

    public class DOMStreamReader
    extends Object
    implements XMLStreamReader, NamespaceContext
    Create an XMLStreamReader on top of a DOM tree.

    Since various libraries as well as users often create "incorrect" DOM node, this class spends a lot of efforts making sure that broken DOM trees are nevertheless interpreted correctly.

    For example, if a DOM level 1 tree is passed, each method will attempt to return the correct value by using Node.getNodeName().

    Similarly, if DOM is missing explicit namespace declarations, this class attempts to emulate necessary declarations.

    Author:
    [email protected], Kohsuke Kawaguchi