com.epam.xml.reader
Interface DocumentReader

All Known Implementing Classes:
AbstractDocumentReader, DOMReader, SAXReader

public interface DocumentReader

Reads XML document.


Method Summary
 void addUnmarshalerListener(UnmarshalerListener listener)
          Assign unmarshaler listener to the document reader.
 void close()
          Close the reader, if necessary.
 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.
 String getNodeName()
          Get the name of the current node.
 String getValue()
          Get the value (text content) of the current node.
 boolean hasMoreChildren()
          Does the node have any more children remaining that have not yet been read?
 boolean isEndOfDocument()
          Checks of end of xml document.
 void moveDown()
          Select the current child as current node.
 void moveUp()
          Select the parent node as current node.
 

Method Detail

hasMoreChildren

boolean hasMoreChildren()
Does the node have any more children remaining that have not yet been read?

Returns:
True if element has the children nodes.

moveDown

void moveDown()
Select the current child as current node. A call to this function must be balanced with a call to moveUp().


moveUp

void moveUp()
Select the parent node as current node.


getNodeName

String getNodeName()
Get the name of the current node.


getValue

String getValue()
Get the value (text content) of the current node.


getAttribute

String getAttribute(String name)
Get the value of an attribute of the current node.

Parameters:
name - Name of attribute.

getAttribute

String getAttribute(int index)
Get the value of an attribute of the current node, by index.

Parameters:
index - Index of attribute.

getAttributeCount

int getAttributeCount()
Number of attributes in current node.


getAttributeName

String getAttributeName(int index)
Name of attribute in current node.


close

void close()
Close the reader, if necessary.


isEndOfDocument

boolean isEndOfDocument()
Checks of end of xml document.

Returns:
True if end of document.

addUnmarshalerListener

void addUnmarshalerListener(UnmarshalerListener listener)
Assign unmarshaler listener to the document reader.

Parameters:
listener -

execute

void execute()


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