[Java] Class Namespace
- groovy.xml.Namespace
A simple helper class which acts as a factory of QName instances.
Constructor Summary
| Constructor and description | 
|---|
| Namespace
                                () | 
| Namespace
                                (String uri) | 
| Namespace
                                (String uri, String prefix) | 
Methods Summary
| Type Params | Return Type | Name and description | 
|---|---|---|
| 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 | 
Inherited Methods Summary
| Methods inherited from class | Name | 
|---|---|
| class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
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
    © 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
    https://docs.groovy-lang.org/2.4.21/html/gapi/groovy/xml/Namespace.html