Module java.xml

Interface Namespace

All Superinterfaces:
Attribute, XMLEvent, XMLStreamConstants

public interface Namespace extends Attribute
An interface that contains information about a namespace. Namespaces are accessed from a StartElement.
Since:
1.6
See Also:
  • Method Details

    • getPrefix

      String getPrefix()
      Gets the prefix, returns "" if this is a default namespace declaration.
      Returns:
      the prefix
    • getNamespaceURI

      String getNamespaceURI()
      Gets the uri bound to the prefix of this namespace
      Returns:
      the NamespaceURI
    • isDefaultNamespaceDeclaration

      boolean isDefaultNamespaceDeclaration()
      returns true if this attribute declares the default namespace
      Returns:
      true if this is default namespace, false otherwise