|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.epam.xml.reader.SAXReader
public class SAXReader
The reader based on SAX parser.
Constructor Summary | |
---|---|
SAXReader(InputSource source,
XMLReader parser)
|
Method Summary | |
---|---|
void |
addUnmarshalerListener(UnmarshalerListener listener)
(non-Javadoc) |
void |
close()
Close the reader, if necessary. |
static DocumentReader |
createReader(File xml,
UnmarshalerListener listener)
|
static DocumentReader |
createReader(InputStream xml,
UnmarshalerListener listener)
|
void |
execute()
(non-Javadoc) |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SAXReader(InputSource source, XMLReader parser)
Method Detail |
---|
public void close()
DocumentReader
close
in interface DocumentReader
public String getAttribute(String name)
DocumentReader
getAttribute
in interface DocumentReader
name
- Name of attribute.public String getAttribute(int index)
DocumentReader
getAttribute
in interface DocumentReader
index
- Index of attribute.public int getAttributeCount()
DocumentReader
getAttributeCount
in interface DocumentReader
public String getAttributeName(int index)
DocumentReader
getAttributeName
in interface DocumentReader
public String getNodeName()
DocumentReader
getNodeName
in interface DocumentReader
public String getValue()
DocumentReader
getValue
in interface DocumentReader
public boolean hasMoreChildren()
DocumentReader
hasMoreChildren
in interface DocumentReader
public boolean isEndOfDocument()
DocumentReader
isEndOfDocument
in interface DocumentReader
public void moveDown()
DocumentReader
DocumentReader.moveUp()
.
moveDown
in interface DocumentReader
public void moveUp()
DocumentReader
moveUp
in interface DocumentReader
public static DocumentReader createReader(InputStream xml, UnmarshalerListener listener)
public static DocumentReader createReader(File xml, UnmarshalerListener listener)
public void addUnmarshalerListener(UnmarshalerListener listener)
addUnmarshalerListener
in interface DocumentReader
DocumentReader.addUnmarshalerListener(com.epam.xml.engine.UnmarshalerListener)
public void execute()
execute
in interface DocumentReader
()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |