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 IXMLReader
public boolean hasNext()
hasNext
in interface IXMLReader
public int next()
next
in interface IXMLReader
public XmlTag getXmlTag()
getXmlTag
in interface IXMLReader
public XmlTag getClosedTag()
getClosedTag
in interface IXMLReader
public java.util.LinkedList<XmlTag> getXmlTagStack()
getXmlTagStack
in interface IXMLReader
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttributes
in interface IXMLReader
public java.lang.String getText()
getText
in interface IXMLReader
public void close()
close
in interface IXMLReader
public ILocation getLocation()
getLocation
in interface IXMLReader
public java.lang.String getLocalName()
getLocalName
in interface IXMLReader
public int getAttributeCount()
getAttributeCount
in interface IXMLReader
public java.lang.String getAttributeLocalName(int i)
getAttributeLocalName
in interface IXMLReader
public java.lang.String getAttributeValue(int i)
getAttributeValue
in interface IXMLReader
public QName getName()
getName
in interface IXMLReader
public java.lang.String getAttributePrefix(int i)
getAttributePrefix
in interface IXMLReader
public java.lang.String getAttributeNamespace(int i)
getAttributeNamespace
in interface IXMLReader