Top Description Inners Methods
org.jvnet.staxex

public Interface NamespaceContextEx

extends NamespaceContext, Iterable<NamespaceContextEx.Binding>
Imports
javax.xml.namespace.NamespaceContext, java.util.Iterator

Extended NamespaceContext.
Authors
Kohsuke Kawaguchi, Paul Sandoz

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
NamespaceContextEx.Binding

Prefix to namespace URI binding.

Method Summary

Modifier and TypeMethod and Description
public Iterator<NamespaceContextEx.Binding>

Returns:

may return an empty iterator, but never null.
iterator
()

Redeclares java.lang.Iterable.iterator.

Iterates all the in-scope namespace bindings.

Inherited from java.lang.Iterable:
forEachspliterator
Inherited from javax.xml.namespace.NamespaceContext:
getNamespaceURIgetPrefixgetPrefixes

Method Detail

iteratorback to summary
public Iterator<NamespaceContextEx.Binding> iterator()

Redeclares java.lang.Iterable.iterator.

Iterates all the in-scope namespace bindings.

This method enumerates all the active in-scope namespace bindings. This does not include implicit bindings, such as "xml"->"http://www.w3.org/XML/1998/namespace" or ""->"" (the implicit default namespace URI.)

The returned iterator may not include the same prefix more than once. For example, the returned iterator may only contain f=ns2 if the document is as follows and this method is used at the bar element.

<foo xmlns:f='ns1'>
  <bar xmlns:f='ns2'>
    ...

The iteration may be done in no particular order.

Returns:Iterator<NamespaceContextEx.Binding>

may return an empty iterator, but never null.

Annotations
@Override
org.jvnet.staxex back to summary

public Interface NamespaceContextEx.Binding


Prefix to namespace URI binding.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

never null. String like "http://www.w3.org/XML/1998/namespace", "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", or "".
getNamespaceURI
()

Gets the namespace URI.

public String

Returns:

never null. String like "foo", "ns12", or "".
getPrefix
()

Gets the prefix.

Method Detail

getNamespaceURIback to summary
public String getNamespaceURI()

Gets the namespace URI.

The empty namespace URI is represented by using an empty string "", not null.

Returns:String

never null. String like "http://www.w3.org/XML/1998/namespace", "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", or "".

getPrefixback to summary
public String getPrefix()

Gets the prefix.

The default namespace URI is represented by using an empty string "", not null.

Returns:String

never null. String like "foo", "ns12", or "".