Class DomReader

    • Field Detail

      • currentElement

        private org.w3c.dom.Element currentElement
      • textBuffer

        private java.lang.StringBuffer textBuffer
      • childElements

        private java.util.List childElements
    • Constructor Detail

      • DomReader

        public DomReader​(org.w3c.dom.Element rootElement)
      • DomReader

        public DomReader​(org.w3c.dom.Document document)
      • DomReader

        public DomReader​(org.w3c.dom.Element rootElement,
                         NameCoder nameCoder)
        Since:
        1.4
      • DomReader

        public DomReader​(org.w3c.dom.Document document,
                         NameCoder nameCoder)
        Since:
        1.4
    • Method Detail

      • getNodeName

        public java.lang.String getNodeName()
        Description copied from interface: HierarchicalStreamReader
        Get the name of the current node.
      • getValue

        public java.lang.String getValue()
        Description copied from interface: HierarchicalStreamReader
        Get the value (text content) of the current node.
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String name)
        Description copied from interface: HierarchicalStreamReader
        Get the value of an attribute of the current node.

        If no such attribute exists, the method returns null.

      • getAttribute

        public java.lang.String getAttribute​(int index)
        Description copied from interface: HierarchicalStreamReader
        Get the value of an attribute of the current node, by index.

        Note, the behavior of this method is dependent on the underlying parser when calling it with a non-existing index. Typically some kind of RuntimeException is thrown.

      • getAttributeCount

        public int getAttributeCount()
        Description copied from interface: HierarchicalStreamReader
        Number of attributes in current node.
      • getAttributeName

        public java.lang.String getAttributeName​(int index)
        Description copied from interface: HierarchicalStreamReader
        Name of attribute in current node.

        Note, the behavior of this method is dependent on the underlying parser when calling it with a non-existing index. Typically some kind of RuntimeException is thrown.