INamespaceContext.GetPrefixes(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get all prefixes bound to a Namespace URI in the current scope.
[Android.Runtime.Register("getPrefixes", "(Ljava/lang/String;)Ljava/util/Iterator;", "GetGetPrefixes_Ljava_lang_String_Handler:Javax.Xml.Namespace.INamespaceContextInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Util.IIterator? GetPrefixes (string? namespaceURI);
[<Android.Runtime.Register("getPrefixes", "(Ljava/lang/String;)Ljava/util/Iterator;", "GetGetPrefixes_Ljava_lang_String_Handler:Javax.Xml.Namespace.INamespaceContextInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetPrefixes : string -> Java.Util.IIterator
Parameters
- namespaceURI
- String
URI of Namespace to lookup
Returns
Iterator
for all prefixes bound to the
Namespace URI in the current scope
- Attributes
Remarks
Get all prefixes bound to a Namespace URI in the current scope.
An Iterator over String elements is returned in an arbitrary, <strong>implementation dependent</strong>, order.
<strong>The Iterator
is <em>not</em> modifiable. e.g. the remove()
method will throw UnsupportedOperationException
.</strong>
When requesting prefixes by Namespace URI, the following table describes the returned prefixes value for all Namespace URI values:
<table border="2" rules="all" cellpadding="4"> <thead> <tr> <td align="center" colspan="2"> getPrefixes(namespaceURI)
return value for specified Namespace URIs</td> </tr> <tr> <td>Namespace URI parameter</td> <td>prefixes value returned</td> </tr> </thead> <tbody> <tr> <td>bound Namespace URI, including the <default Namespace URI></td> <td>Iterator
over prefixes bound to Namespace URI in the current scope in an arbitrary, <strong>implementation dependent</strong>, order</td> </tr> <tr> <td>unbound Namespace URI</td> <td>empty Iterator
</td> </tr> <tr> <td>XMLConstants.XML_NS_URI
("http://www.w3.org/XML/1998/namespace")</td> <td>Iterator
with one element set to XMLConstants.XML_NS_PREFIX
("xml")</td> </tr> <tr> <td>XMLConstants.XMLNS_ATTRIBUTE_NS_URI
("http://www.w3.org/2000/xmlns/")</td> <td>Iterator
with one element set to XMLConstants.XMLNS_ATTRIBUTE
("xmlns")</td> </tr> <tr> <td>null
</td> <td>IllegalArgumentException
is thrown</td> </tr> </tbody> </table>
Java documentation for javax.xml.namespace.NamespaceContext.getPrefixes(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.