org.modeshape.common.xml

## Class SimpleNamespaceContext

- java.lang.Object
- - org.modeshape.common.xml.SimpleNamespaceContext

- All Implemented Interfaces:
    NamespaceContext

      public class SimpleNamespaceContext
      extends Object
      implements NamespaceContext

  A simple `NamespaceContext` implementation that maintains the namespace and prefix mappings discovered within an XML document.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleNamespaceContext()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getNamespaceURI(String prefix)`
    `String` | `getPrefix(String namespaceURI)`
    `Iterator<String>` | `getPrefixes(String namespaceURI)`
    `SimpleNamespaceContext` | `setNamespace(String prefix, String namespaceUri)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleNamespaceContext

          public SimpleNamespaceContext()

  - ### Method Detail

    - #### getNamespaceURI

          public String getNamespaceURI(String prefix)

      Specified by:
        `getNamespaceURI` in interface `NamespaceContext`

    - #### getPrefix

          public String getPrefix(String namespaceURI)

      Specified by:
        `getPrefix` in interface `NamespaceContext`

    - #### setNamespace

          public SimpleNamespaceContext setNamespace(String prefix,
                                            String namespaceUri)

    - #### getPrefixes

          public Iterator<String> getPrefixes(String namespaceURI)

      Specified by:
        `getPrefixes` in interface `NamespaceContext`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.