org.springframework.util.xml
Class XMLEventStreamReader
java.lang.Object
org.springframework.util.xml.AbstractXMLStreamReader
org.springframework.util.xml.XMLEventStreamReader
- All Implemented Interfaces:
- javax.xml.stream.XMLStreamConstants, javax.xml.stream.XMLStreamReader
class XMLEventStreamReader
- extends AbstractXMLStreamReader
Implementation of the XMLStreamReader
interface that wraps a XMLEventReader
. Useful,
because the StAX XMLInputFactory
allows one to create a event reader from a stream reader,
but not vice-versa.
- Since:
- 3.0
- Author:
- Arjen Poutsma
- See Also:
StaxUtils.createEventStreamReader(javax.xml.stream.XMLEventReader)
Field Summary |
private javax.xml.stream.events.XMLEvent |
event
|
private javax.xml.stream.XMLEventReader |
eventReader
|
Fields inherited from interface javax.xml.stream.XMLStreamConstants |
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT |
Methods inherited from class org.springframework.util.xml.AbstractXMLStreamReader |
getAttributeLocalName, getAttributeNamespace, getAttributePrefix, getAttributeValue, getElementText, getLocalName, getNamespaceURI, getNamespaceURI, getPrefix, getTextCharacters, getTextCharacters, getTextLength, hasName, hasNext, hasText, isCharacters, isEndElement, isStartElement, isWhiteSpace, nextTag, require |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
event
private javax.xml.stream.events.XMLEvent event
eventReader
private final javax.xml.stream.XMLEventReader eventReader
XMLEventStreamReader
XMLEventStreamReader(javax.xml.stream.XMLEventReader eventReader)
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
isStandalone
public boolean isStandalone()
getVersion
public java.lang.String getVersion()
getTextStart
public int getTextStart()
getText
public java.lang.String getText()
getPITarget
public java.lang.String getPITarget()
getPIData
public java.lang.String getPIData()
getNamespaceCount
public int getNamespaceCount()
getNamespaceContext
public javax.xml.namespace.NamespaceContext getNamespaceContext()
getName
public javax.xml.namespace.QName getName()
getLocation
public javax.xml.stream.Location getLocation()
getEventType
public int getEventType()
getEncoding
public java.lang.String getEncoding()
getCharacterEncodingScheme
public java.lang.String getCharacterEncodingScheme()
getAttributeCount
public int getAttributeCount()
close
public void close()
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
getAttributeName
public javax.xml.namespace.QName getAttributeName(int index)
getAttributeType
public java.lang.String getAttributeType(int index)
getAttributeValue
public java.lang.String getAttributeValue(int index)
getNamespacePrefix
public java.lang.String getNamespacePrefix(int index)
getNamespaceURI
public java.lang.String getNamespaceURI(int index)
getProperty
public java.lang.Object getProperty(java.lang.String name)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
isAttributeSpecified
public boolean isAttributeSpecified(int index)
next
public int next()
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
standaloneSet
public boolean standaloneSet()
countIterator
private int countIterator(java.util.Iterator iterator)
getAttribute
private javax.xml.stream.events.Attribute getAttribute(int index)
getNamespace
private javax.xml.stream.events.Namespace getNamespace(int index)