Class NamespaceBase

All Implemented Interfaces:
Attribute, Namespace, XMLEvent, XMLStreamConstants

public class NamespaceBase extends AttributeBase implements Namespace
  • Field Details

  • Constructor Details

    • NamespaceBase

      public NamespaceBase(String namespaceURI)
      a namespace attribute has a form: xmlns:NCName="URI reference"
    • NamespaceBase

      public NamespaceBase(String prefix, String namespaceURI)
      Create a new Namespace
      Parameters:
      prefix - prefix of a namespace is the local name for an attribute
      namespaceURI - the uri reference of a namespace is the value for an attribute
  • Method Details

    • setPrefix

      void setPrefix(String prefix)
    • getPrefix

      public String getPrefix()
      Specified by:
      getPrefix in interface Namespace
    • setNamespaceURI

      void setNamespaceURI(String uri)
      set Namespace URI reference (xmlns:prefix = "uri")
      Parameters:
      uri - the uri reference of a namespace is the value for an attribute
    • getNamespaceURI

      public String getNamespaceURI()
      Specified by:
      getNamespaceURI in interface Namespace
    • isNamespace

      public boolean isNamespace()
      Description copied from class: EventBase
      A utility function to check if this event is a Namespace.
      Specified by:
      isNamespace in interface XMLEvent
      Overrides:
      isNamespace in class EventBase
      See Also:
    • isDefaultNamespaceDeclaration

      public boolean isDefaultNamespaceDeclaration()
      Specified by:
      isDefaultNamespaceDeclaration in interface Namespace