共用方式為


IXmlPullParser.GetNamespacePrefix(Int32) Method

Definition

Returns the namespace prefix for the given position in the namespace stack.

[Android.Runtime.Register("getNamespacePrefix", "(I)Ljava/lang/String;", "GetGetNamespacePrefix_IHandler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetNamespacePrefix (int pos);
[<Android.Runtime.Register("getNamespacePrefix", "(I)Ljava/lang/String;", "GetGetNamespacePrefix_IHandler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetNamespacePrefix : int -> string

Parameters

pos
Int32

Returns

Attributes

Exceptions

Remarks

Returns the namespace prefix for the given position in the namespace stack. Default namespace declaration (xmlns='...') will have null as prefix. If the given index is out of range, an exception is thrown.

<b>Please note:</b> when the parser is on an END_TAG, namespace prefixes that were declared in the corresponding START_TAG are still accessible although they are no longer in scope.

Java documentation for org.xmlpull.v1.XmlPullParser.getNamespacePrefix(int).

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