public class NamespaceBase extends AttributeBase implements javax.xml.stream.events.Namespace
| Modifier and Type | Field and Description |
|---|---|
(package private) static java.lang.String |
DEFAULT_NS_PREFIX |
private boolean |
defaultDeclaration |
(package private) static java.lang.String |
W3C_XML_SCHEMA_INSTANCE_NS_URI |
(package private) static java.lang.String |
W3C_XML_SCHEMA_NS_URI |
(package private) static java.lang.String |
XML_NS_PREFIX |
(package private) static java.lang.String |
XML_NS_URI |
(package private) static java.lang.String |
XMLNS_ATTRIBUTE |
(package private) static java.lang.String |
XMLNS_ATTRIBUTE_NS_URI |
_eventType, _location| Constructor and Description |
|---|
NamespaceBase(java.lang.String namespaceURI)
a namespace attribute has a form: xmlns:NCName="URI reference"
|
NamespaceBase(java.lang.String prefix,
java.lang.String namespaceURI)
Create a new Namespace
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getNamespaceURI() |
java.lang.String |
getPrefix() |
boolean |
isDefaultNamespaceDeclaration() |
boolean |
isNamespace()
A utility function to check if this event is a Namespace.
|
(package private) void |
setNamespaceURI(java.lang.String uri)
set Namespace URI reference (xmlns:prefix = "uri")
|
(package private) void |
setPrefix(java.lang.String prefix) |
getDTDType, getLocalName, getName, getValue, isSpecified, setAttributeType, setName, setSpecified, setValue, toStringasCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, getSystemId, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isProcessingInstruction, isStartDocument, isStartElement, setEventType, setLocation, writeAsEncodedUnicodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDTDType, getName, getValue, isSpecifiedasCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicodestatic final java.lang.String DEFAULT_NS_PREFIX
static final java.lang.String XML_NS_URI
static final java.lang.String XML_NS_PREFIX
static final java.lang.String XMLNS_ATTRIBUTE_NS_URI
static final java.lang.String XMLNS_ATTRIBUTE
static final java.lang.String W3C_XML_SCHEMA_NS_URI
static final java.lang.String W3C_XML_SCHEMA_INSTANCE_NS_URI
private boolean defaultDeclaration
public NamespaceBase(java.lang.String namespaceURI)
public NamespaceBase(java.lang.String prefix,
java.lang.String namespaceURI)
prefix - prefix of a namespace is the local name for an attributenamespaceURI - the uri reference of a namespace is the value for an attributevoid setPrefix(java.lang.String prefix)
public java.lang.String getPrefix()
getPrefix in interface javax.xml.stream.events.Namespacevoid setNamespaceURI(java.lang.String uri)
uri - the uri reference of a namespace is the value for an attributepublic java.lang.String getNamespaceURI()
getNamespaceURI in interface javax.xml.stream.events.Namespacepublic boolean isNamespace()
EventBaseisNamespace in interface javax.xml.stream.events.XMLEventisNamespace in class EventBaseNamespacepublic boolean isDefaultNamespaceDeclaration()
isDefaultNamespaceDeclaration in interface javax.xml.stream.events.Namespace