public class NamespaceBase extends AttributeBase implements javax.xml.stream.events.Namespace
The default implementation of the namespace class
Constructor and Description |
---|
NamespaceBase(java.lang.String namespaceURI) |
NamespaceBase(java.lang.String prefix,
java.lang.String namespaceURI) |
Modifier and Type | Method and Description |
---|---|
int |
getEventType()
Returns an integer code for this event.
|
java.lang.String |
getNamespaceURI()
Gets the uri bound to the prefix of this namespace
|
java.lang.String |
getPrefix()
Gets the prefix, returns "" if this is a default
namespace declaration.
|
boolean |
isAttribute()
A utility function to check if this event is an Attribute.
|
boolean |
isDefaultNamespaceDeclaration()
returns true if this attribute declares the default namespace
|
boolean |
isNamespace()
A utility function to check if this event is a Namespace.
|
java.lang.String |
toString() |
asCharacters, asEndElement, asStartElement, getCharacterOffset, getColumnNumber, getDTDType, getLineNumber, getLocalName, getLocation, getLocationURI, getName, getPublicId, getSchemaType, getSourceName, getSystemId, getValue, hasName, isCharacters, isDefault, isEndDocument, isEndElement, isEndEntity, isEntityReference, isNamespaceDeclaration, isProcessingInstruction, isSpecified, isStartDocument, isStartElement, isStartEntity, recycle, setCharacterOffset, setColumnNumber, setLineNumber, setLocationURI, setNamespaceURI, writeAsEncodedUnicode, writeEncodedChar
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public NamespaceBase(java.lang.String prefix, java.lang.String namespaceURI)
public NamespaceBase(java.lang.String namespaceURI)
public int getEventType()
javax.xml.stream.events.XMLEvent
getEventType
in interface javax.xml.stream.events.XMLEvent
getEventType
in class AttributeBase
XMLStreamConstants.START_ELEMENT
,
XMLStreamConstants.END_ELEMENT
,
XMLStreamConstants.CHARACTERS
,
XMLStreamConstants.ATTRIBUTE
,
XMLStreamConstants.NAMESPACE
,
XMLStreamConstants.PROCESSING_INSTRUCTION
,
XMLStreamConstants.COMMENT
,
XMLStreamConstants.START_DOCUMENT
,
XMLStreamConstants.END_DOCUMENT
,
XMLStreamConstants.DTD
public boolean isAttribute()
javax.xml.stream.events.XMLEvent
isAttribute
in interface javax.xml.stream.events.XMLEvent
isAttribute
in class AttributeBase
Attribute
public boolean isNamespace()
javax.xml.stream.events.XMLEvent
isNamespace
in interface javax.xml.stream.events.XMLEvent
isNamespace
in class AttributeBase
Namespace
public java.lang.String getPrefix()
javax.xml.stream.events.Namespace
getPrefix
in interface javax.xml.stream.events.Namespace
public java.lang.String getNamespaceURI()
javax.xml.stream.events.Namespace
getNamespaceURI
in interface javax.xml.stream.events.Namespace
getNamespaceURI
in class AttributeBase
public boolean isDefaultNamespaceDeclaration()
javax.xml.stream.events.Namespace
isDefaultNamespaceDeclaration
in interface javax.xml.stream.events.Namespace
public java.lang.String toString()
toString
in class AttributeBase