Sdílet prostřednictvím


NamespaceSupport.GetPrefixes(String) Method

Definition

Return an enumeration of all prefixes for a given URI whose declarations are active in the current context.

[Android.Runtime.Register("getPrefixes", "(Ljava/lang/String;)Ljava/util/Enumeration;", "GetGetPrefixes_Ljava_lang_String_Handler")]
public virtual Java.Util.IEnumeration? GetPrefixes (string? uri);
[<Android.Runtime.Register("getPrefixes", "(Ljava/lang/String;)Ljava/util/Enumeration;", "GetGetPrefixes_Ljava_lang_String_Handler")>]
abstract member GetPrefixes : string -> Java.Util.IEnumeration
override this.GetPrefixes : string -> Java.Util.IEnumeration

Parameters

uri
String

The Namespace URI.

Returns

An enumeration of prefixes (never empty).

Attributes

Remarks

Return an enumeration of all prefixes for a given URI whose declarations are active in the current context. This includes declarations from parent contexts that have not been overridden.

This method returns prefixes mapped to a specific Namespace URI. The xml: prefix will be included. If you want only one prefix that's mapped to the Namespace URI, and you don't care which one you get, use the #getPrefix getPrefix method instead.

<strong>Note:</strong> the empty (default) prefix is <em>never</em> included in this enumeration; to check for the presence of a default Namespace, use the #getURI getURI method with an argument of "".

Java documentation for org.xml.sax.helpers.NamespaceSupport.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.

Applies to

See also