| Constructor and Description |
|---|
DefaultXMLStreamReader(XMLStreamReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeReader()
Closes the underlying reader.
|
int |
getAttributeCount()
Returns the count of attributes on this start element.
|
String |
getAttributeValue(String attributeName)
Reads the value of the XML attribute with the given name.
|
String |
getElementName()
Reads the name of the current XML element.
|
String |
getElementValue()
Reads the value of the current XML element.
|
protected String |
getText() |
XMLStreamReader |
getXmlStreamReader()
Provides the underlying XMLStreamReader.
|
boolean |
isEndElement(String name)
Checks whether the current XML element is an end element with the given name.
|
boolean |
isStartElement(String name)
Checks whether the current XML element is a start element with the given name.
|
void |
moveToStartElement(String name)
Moves the cursor to the first XML start element with the given name in the document.
|
boolean |
moveToStartElement(String startElementName,
String endElementName)
Moves the cursor to the first XML start element with the given name in the document.
|
boolean |
next()
Moves the cursor to the next XML element in the document.
|
boolean |
next(String endElementName)
Moves the cursor to the next XML element in the document.
|
Map<String,String> |
readElements(String elementName)
Reads values for all properties for an element into a Map, where the key
is the property and the value is the value.
|
public DefaultXMLStreamReader(XMLStreamReader reader)
public String getElementName()
XMLReadergetElementName in interface XMLReaderpublic String getElementValue()
XMLReadergetElementValue in interface XMLReaderpublic void moveToStartElement(String name)
XMLReadermoveToStartElement in interface XMLReadername - The name of the XML element to move to.public boolean moveToStartElement(String startElementName, String endElementName)
XMLReadermoveToStartElement in interface XMLReaderstartElementName - The name of the XML start element to move to.endElementName - The name of the XML end element to stop moving forward at.public boolean isStartElement(String name)
XMLReaderisStartElement in interface XMLReadername - The name of the XML element.public boolean isEndElement(String name)
XMLReaderisEndElement in interface XMLReadername - The name of the XML element.public boolean next()
XMLReaderpublic boolean next(String endElementName)
XMLReaderpublic String getAttributeValue(String attributeName)
XMLReadergetAttributeValue in interface XMLReaderattributeName - The name of the attribute.public int getAttributeCount()
XMLReadergetAttributeCount in interface XMLReaderpublic Map<String,String> readElements(String elementName)
XMLReaderreadElements in interface XMLReaderelementName - the name of the XML element.public XMLStreamReader getXmlStreamReader()
XMLReadergetXmlStreamReader in interface XMLReaderpublic void closeReader()
XMLReadercloseReader in interface XMLReaderprotected String getText() throws XMLStreamException
XMLStreamExceptionCopyright © 2015 AmpleCode. All rights reserved.