Package: groovy.xml

## [Java] Class Namespace

- groovy.xml.Namespace

-     public class Namespace
      extends Object

  A simple helper class which acts as a factory of QName instances.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `Namespace()`
    `Namespace(String uri)`
    `Namespace(String uri, String prefix)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public QName` | `get(String localName)` Returns the QName for the given localName.
    `` | `public String` | `getPrefix()` Returns the prefix mapped to this namespace
    `` | `public String` | `getUri()` Returns the URI of this namespace

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### public Namespace()

    - #### public Namespace(String uri)

    - #### public Namespace(String uri, String prefix)

  - ### Method Detail

    - #### public QName get(String localName)

      Returns the QName for the given localName.

      Parameters:
        `localName` - the local name within this

    - #### public String getPrefix()

      Returns the prefix mapped to this namespace

      Returns:
        the prefix assigned to this namespace or null if no namespace is mapped.

    - #### public String getUri()

      Returns the URI of this namespace

      Returns:
        the URI of this namespace