public class SAXReader extends Object implements DocumentReader
Constructor and Description |
---|
SAXReader(InputSource source,
XMLReader parser) |
Modifier and Type | Method and Description |
---|---|
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.
|
public SAXReader(InputSource source, XMLReader parser)
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
()
Copyright © 2000–2022 EPAM Systems. All rights reserved.