Compartilhar via


IXmlPullParser.GetAttributeValue Method

Definition

Overloads

GetAttributeValue(Int32)

Returns the given attributes value.

GetAttributeValue(String, String)

Returns the attributes value identified by namespace URI and namespace localName.

GetAttributeValue(Int32)

Returns the given attributes value.

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

Parameters

index
Int32

zero-based index of attribute

Returns

value of attribute (null is never returned)

Attributes

Remarks

Returns the given attributes value. Throws an IndexOutOfBoundsException if the index is out of range or current event type is not START_TAG.

<strong>NOTE:</strong> attribute value must be normalized (including entity replacement text if PROCESS_DOCDECL is false) as described in XML 1.0 section 3.3.3 Attribute-Value Normalization

Java documentation for org.xmlpull.v1.XmlPullParser.getAttributeValue(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

GetAttributeValue(String, String)

Returns the attributes value identified by namespace URI and namespace localName.

[Android.Runtime.Register("getAttributeValue", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetAttributeValue_Ljava_lang_String_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetAttributeValue (string? namespace, string? name);
[<Android.Runtime.Register("getAttributeValue", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetAttributeValue_Ljava_lang_String_Ljava_lang_String_Handler:Org.XmlPull.V1.IXmlPullParserInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetAttributeValue : string * string -> string

Parameters

namespace
String

Namespace of the attribute if namespaces are enabled otherwise must be null

name
String

If namespaces enabled local name of attribute otherwise just attribute name

Returns

value of attribute or null if attribute with given name does not exist

Attributes

Remarks

Returns the attributes value identified by namespace URI and namespace localName. If namespaces are disabled namespace must be null. If current event type is not START_TAG then IndexOutOfBoundsException will be thrown.

<strong>NOTE:</strong> attribute value must be normalized (including entity replacement text if PROCESS_DOCDECL is false) as described in XML 1.0 section 3.3.3 Attribute-Value Normalization

Java documentation for org.xmlpull.v1.XmlPullParser.getAttributeValue(java.lang.String, 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