public class StaxReaderWrapper extends java.lang.Object implements IXMLReader
| Modifier and Type | Field and Description |
|---|---|
protected java.io.BufferedInputStream |
bis
The stream.
|
protected XmlTag |
closedtag
The last tag that was closed.
|
protected javax.xml.stream.XMLStreamReader |
reader
The wrapped reader.
|
protected java.util.LinkedList<XmlTag> |
tagstack
The current tag.
|
| Constructor and Description |
|---|
StaxReaderWrapper(java.io.InputStream in) |
StaxReaderWrapper(javax.xml.stream.XMLStreamReader reader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader.
|
int |
getAttributeCount() |
java.lang.String |
getAttributeLocalName(int i) |
java.lang.String |
getAttributeNamespace(int i) |
java.lang.String |
getAttributePrefix(int i) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Returns the attributes.
|
java.lang.String |
getAttributeValue(int i) |
XmlTag |
getClosedTag()
Get the XML tag struct of the last closed tag.
|
int |
getEventType()
Gets the XML event type.
|
java.lang.String |
getLocalName() |
ILocation |
getLocation()
Returns the current parser location.
|
QName |
getName() |
java.lang.String |
getText()
Get the text for the element.
|
XmlTag |
getXmlTag()
Get the XML tag struct.
|
java.util.LinkedList<XmlTag> |
getXmlTagStack()
Get the XML tag stack.
|
boolean |
hasNext()
Returns if the reader has more events.
|
int |
next()
Selects the next event.
|
protected java.io.BufferedInputStream bis
protected javax.xml.stream.XMLStreamReader reader
protected java.util.LinkedList<XmlTag> tagstack
protected XmlTag closedtag
public StaxReaderWrapper(java.io.InputStream in)
public StaxReaderWrapper(javax.xml.stream.XMLStreamReader reader)
public int getEventType()
getEventType in interface IXMLReaderpublic boolean hasNext()
hasNext in interface IXMLReaderpublic int next()
next in interface IXMLReaderpublic XmlTag getXmlTag()
getXmlTag in interface IXMLReaderpublic XmlTag getClosedTag()
getClosedTag in interface IXMLReaderpublic java.util.LinkedList<XmlTag> getXmlTagStack()
getXmlTagStack in interface IXMLReaderpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttributes in interface IXMLReaderpublic java.lang.String getText()
getText in interface IXMLReaderpublic void close()
close in interface IXMLReaderpublic ILocation getLocation()
getLocation in interface IXMLReaderpublic java.lang.String getLocalName()
getLocalName in interface IXMLReaderpublic int getAttributeCount()
getAttributeCount in interface IXMLReaderpublic java.lang.String getAttributeLocalName(int i)
getAttributeLocalName in interface IXMLReaderpublic java.lang.String getAttributeValue(int i)
getAttributeValue in interface IXMLReaderpublic QName getName()
getName in interface IXMLReaderpublic java.lang.String getAttributePrefix(int i)
getAttributePrefix in interface IXMLReaderpublic java.lang.String getAttributeNamespace(int i)
getAttributeNamespace in interface IXMLReader