Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.xml
[Java] Class Namespace

    java.lang.Object
      groovy.xml.Namespace

    public class Namespace
    extends Object

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

Version:
  \$Revision: 9925 \$

Constructor Summary
`Namespace()`
`Namespace(String uri)`
`Namespace(String uri, String prefix)`

Method Summary
`QName` | `get(String localName)` Returns the QName for the given localName.
`String` | `getPrefix()` Returns the prefix mapped to this namespace
`String` | `getUri()` Returns the URI of this namespace

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Constructor Detail

### Namespace

    public Namespace()

### Namespace

    public Namespace(String uri)

### Namespace

    public Namespace(String uri, String prefix)

Method Detail

### get

    public QName get(String localName)

  Returns the QName for the given localName.
  Parameters:
    `localName` - the local name within this

### getPrefix

    public String getPrefix()

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

### getUri

    public String getUri()

  Returns the URI of this namespace
  Returns:
    the URI of this namespace

Copyright © 2003-2010 The Codehaus. All rights reserved.