com.epam.xml.reader
Class DOMReader

java.lang.Object
  extended by com.epam.xml.reader.AbstractDocumentReader
      extended by com.epam.xml.reader.DOMReader
All Implemented Interfaces:
DocumentReader

public final class DOMReader
extends AbstractDocumentReader

The reader based on DOM parser.


Field Summary
 
Fields inherited from class com.epam.xml.reader.AbstractDocumentReader
current
 
Method Summary
 void addUnmarshalerListener(UnmarshalerListener listener)
          Assign unmarshaler listener to the document reader.
static DocumentReader createReader(InputStream xml)
           
 void execute()
           
 String getAttribute(int index)
          Get the value of an attribute of the current node, by index.
 String getAttribute(String name)
          Get the value of an attribute of the current node.
 int getAttributeCount()
          Number of attributes in current node.
 String getAttributeName(int index)
          Name of attribute in current node.
protected  Element getChild(Integer pointer)
           
protected  Integer getChildCount()
           
 String getNodeName()
          Get the name of the current node.
protected  Element getParent()
           
 String getValue()
          Get the value (text content) of the current node.
protected  void reassignCurrentElement(Element current)
           
 
Methods inherited from class com.epam.xml.reader.AbstractDocumentReader
close, hasMoreChildren, isEndOfDocument, moveDown, moveUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createReader

public static DocumentReader createReader(InputStream xml)

getChild

protected Element getChild(Integer pointer)
Specified by:
getChild in class AbstractDocumentReader

reassignCurrentElement

protected void reassignCurrentElement(Element current)
Specified by:
reassignCurrentElement in class AbstractDocumentReader

getAttribute

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

Parameters:
name - Name of attribute.

getAttribute

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

Parameters:
index - Index of attribute.

getAttributeCount

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


getAttributeName

public String getAttributeName(int index)
Description copied from interface: DocumentReader
Name of attribute in current node.


getNodeName

public String getNodeName()
Description copied from interface: DocumentReader
Get the name of the current node.


getValue

public String getValue()
Description copied from interface: DocumentReader
Get the value (text content) of the current node.


getChildCount

protected Integer getChildCount()
Specified by:
getChildCount in class AbstractDocumentReader

getParent

protected Element getParent()
Specified by:
getParent in class AbstractDocumentReader

addUnmarshalerListener

public void addUnmarshalerListener(UnmarshalerListener listener)
Description copied from interface: DocumentReader
Assign unmarshaler listener to the document reader.


execute

public void execute()


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.