Dela via


AttributesImpl.GetIndex Method

Definition

Overloads

GetIndex(String)

Look up an attribute's index by qualified (prefixed) name.

GetIndex(String, String)

Look up an attribute's index by Namespace name.

GetIndex(String)

Look up an attribute's index by qualified (prefixed) name.

[Android.Runtime.Register("getIndex", "(Ljava/lang/String;)I", "GetGetIndex_Ljava_lang_String_Handler")]
public virtual int GetIndex (string? qName);
[<Android.Runtime.Register("getIndex", "(Ljava/lang/String;)I", "GetGetIndex_Ljava_lang_String_Handler")>]
abstract member GetIndex : string -> int
override this.GetIndex : string -> int

Parameters

qName
String

The qualified name.

Returns

The attribute's index, or -1 if none matches.

Implements

Attributes

Remarks

Look up an attribute's index by qualified (prefixed) name.

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

See also

Applies to

GetIndex(String, String)

Look up an attribute's index by Namespace name.

[Android.Runtime.Register("getIndex", "(Ljava/lang/String;Ljava/lang/String;)I", "GetGetIndex_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual int GetIndex (string? uri, string? localName);
[<Android.Runtime.Register("getIndex", "(Ljava/lang/String;Ljava/lang/String;)I", "GetGetIndex_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member GetIndex : string * string -> int
override this.GetIndex : string * string -> int

Parameters

uri
String

The attribute's Namespace URI, or the empty string if none is available.

localName
String

The attribute's local name.

Returns

The attribute's index, or -1 if none matches.

Implements

Attributes

Remarks

Look up an attribute's index by Namespace name.

In many cases, it will be more efficient to look up the name once and use the index query methods rather than using the name query methods repeatedly.

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

See also

  • <xref:Org.Xml.Sax.IAttributes.GetIndex(System.String%2c+System.String)>

Applies to