javanet.staxutils
Class BaseXMLStreamReader
java.lang.Object
javanet.staxutils.BaseXMLStreamReader
- All Implemented Interfaces:
- XMLStreamConstants, XMLStreamReader
- public abstract class BaseXMLStreamReader
- extends java.lang.Object
- implements XMLStreamReader
Abstract base class for XMLStreamReader
implementations.
- Version:
- $Revision: 1.2 $
- Author:
- Christian Niles
Field Summary |
protected java.lang.String |
encoding
The stream encoding. |
protected java.lang.String |
systemId
The stream system ID. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.stream.XMLStreamReader |
close, getAttributeCount, getAttributeName, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getPIData, getPITarget, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasNext, isAttributeSpecified, isStandalone, next, standaloneSet |
systemId
protected java.lang.String systemId
- The stream system ID.
encoding
protected java.lang.String encoding
- The stream encoding.
BaseXMLStreamReader
public BaseXMLStreamReader()
BaseXMLStreamReader
public BaseXMLStreamReader(java.lang.String systemId,
java.lang.String encoding)
getSystemId
public java.lang.String getSystemId()
getEncoding
public java.lang.String getEncoding()
- Specified by:
getEncoding
in interface XMLStreamReader
getEventTypeName
public java.lang.String getEventTypeName()
- Returns the name of the current event type.
- Returns:
- The name of the current event type.
nextTag
public int nextTag()
throws XMLStreamException
- Specified by:
nextTag
in interface XMLStreamReader
- Throws:
XMLStreamException
isCharacters
public boolean isCharacters()
- Specified by:
isCharacters
in interface XMLStreamReader
isEndElement
public boolean isEndElement()
- Specified by:
isEndElement
in interface XMLStreamReader
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement
in interface XMLStreamReader
isWhiteSpace
public boolean isWhiteSpace()
- Specified by:
isWhiteSpace
in interface XMLStreamReader
hasName
public boolean hasName()
- Specified by:
hasName
in interface XMLStreamReader
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interface XMLStreamReader
hasText
public boolean hasText()
- Specified by:
hasText
in interface XMLStreamReader
getNamespaceURI
public java.lang.String getNamespaceURI(java.lang.String prefix)
- Specified by:
getNamespaceURI
in interface XMLStreamReader
getNamespaceURI
public java.lang.String getNamespaceURI()
- Specified by:
getNamespaceURI
in interface XMLStreamReader
getAttributeLocalName
public java.lang.String getAttributeLocalName(int index)
- Specified by:
getAttributeLocalName
in interface XMLStreamReader
getAttributeNamespace
public java.lang.String getAttributeNamespace(int index)
- Specified by:
getAttributeNamespace
in interface XMLStreamReader
getAttributePrefix
public java.lang.String getAttributePrefix(int index)
- Specified by:
getAttributePrefix
in interface XMLStreamReader
require
public void require(int type,
java.lang.String namespaceURI,
java.lang.String localName)
throws XMLStreamException
- Specified by:
require
in interface XMLStreamReader
- Throws:
XMLStreamException
getElementText
public java.lang.String getElementText()
throws XMLStreamException
- Specified by:
getElementText
in interface XMLStreamReader
- Throws:
XMLStreamException
getStableLocation
public Location getStableLocation()
- Constructs a new, stable
Location
from the current stream location.
If the stream location implements StaticLocation
, then the stream
location will be returned directly.
- Returns:
- Constructs a new, stable
Location
from the current stream
location, or the current Location
itself if it is already
stable.