Class NamespaceBase

  • All Implemented Interfaces:
    javax.xml.stream.events.Attribute, javax.xml.stream.events.Namespace, javax.xml.stream.events.XMLEvent, javax.xml.stream.Location, javax.xml.stream.XMLStreamConstants

    public class NamespaceBase
    extends AttributeBase
    implements javax.xml.stream.events.Namespace

    The default implementation of the namespace class

    • Constructor Detail

      • NamespaceBase

        public NamespaceBase​(java.lang.String prefix,
                             java.lang.String namespaceURI)
      • NamespaceBase

        public NamespaceBase​(java.lang.String namespaceURI)
    • Method Detail

      • getEventType

        public int getEventType()
        Description copied from interface: javax.xml.stream.events.XMLEvent
        Returns an integer code for this event.
        Specified by:
        getEventType in interface javax.xml.stream.events.XMLEvent
        Overrides:
        getEventType in class AttributeBase
        See Also:
        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
      • isAttribute

        public boolean isAttribute()
        Description copied from interface: javax.xml.stream.events.XMLEvent
        A utility function to check if this event is an Attribute.
        Specified by:
        isAttribute in interface javax.xml.stream.events.XMLEvent
        Overrides:
        isAttribute in class AttributeBase
        See Also:
        Attribute
      • isNamespace

        public boolean isNamespace()
        Description copied from interface: javax.xml.stream.events.XMLEvent
        A utility function to check if this event is a Namespace.
        Specified by:
        isNamespace in interface javax.xml.stream.events.XMLEvent
        Overrides:
        isNamespace in class AttributeBase
        See Also:
        Namespace
      • getPrefix

        public java.lang.String getPrefix()
        Description copied from interface: javax.xml.stream.events.Namespace
        Gets the prefix, returns "" if this is a default namespace declaration.
        Specified by:
        getPrefix in interface javax.xml.stream.events.Namespace
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
        Description copied from interface: javax.xml.stream.events.Namespace
        Gets the uri bound to the prefix of this namespace
        Specified by:
        getNamespaceURI in interface javax.xml.stream.events.Namespace
        Overrides:
        getNamespaceURI in class AttributeBase
      • isDefaultNamespaceDeclaration

        public boolean isDefaultNamespaceDeclaration()
        Description copied from interface: javax.xml.stream.events.Namespace
        returns true if this attribute declares the default namespace
        Specified by:
        isDefaultNamespaceDeclaration in interface javax.xml.stream.events.Namespace