Class XmlNs

java.lang.Object
org.libxmq.imp.xml.XmlNs
All Implemented Interfaces:
XMQNS

public class XmlNs extends Object implements XMQNS
A namespace, like the libxml2 xmlNs struct. A namespace is declared on an element (the nsDef list) and referenced by elements and attributes using it. A prefix of null is the default namespace.
  • Constructor Details

    • XmlNs

      public XmlNs(String prefix, String uri)
      Create a namespace.
      Parameters:
      prefix - The prefix, null for the default namespace.
      uri - The namespace uri.
  • Method Details

    • prefix

      public String prefix()
      Returns the prefix.
      Specified by:
      prefix in interface XMQNS
      Returns:
      The prefix, null for the default namespace.
    • uri

      public String uri()
      Returns the namespace uri.
      Specified by:
      uri in interface XMQNS
      Returns:
      The uri.
    • setUri

      public void setUri(String uri)
      Set the namespace uri.
      Specified by:
      setUri in interface XMQNS
      Parameters:
      uri - The new uri.
    • toString

      public String toString()
      Overrides:
      toString in class Object