IAttributes.GetType Method

Definition

Overloads

GetType(Int32)

Look up an attribute's type by index.

GetType(String)

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

GetType(String, String)

Look up an attribute's type by Namespace name.

GetType(Int32)

Look up an attribute's type by index.

[Android.Runtime.Register("getType", "(I)Ljava/lang/String;", "GetGetType_IHandler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetType (int index);
[<Android.Runtime.Register("getType", "(I)Ljava/lang/String;", "GetGetType_IHandler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetType : int -> string

Parameters

index
Int32

The attribute index (zero-based).

Returns

The attribute's type as a string, or null if the index is out of range.

Attributes

Remarks

Look up an attribute's type by index.

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

Java documentation for org.xml.sax.Attributes.getType(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.

See also

Applies to

GetType(String)

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

[Android.Runtime.Register("getType", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetType_Ljava_lang_String_Handler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetType (string? qName);
[<Android.Runtime.Register("getType", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetType_Ljava_lang_String_Handler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetType : string -> string

Parameters

qName
String

The XML qualified name.

Returns

The attribute type as a string, or null if the attribute is not in the list or if qualified names are not available.

Attributes

Remarks

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

See #getType(int) getType(int) for a description of the possible types.

Java documentation for org.xml.sax.Attributes.getType(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

GetType(String, String)

Look up an attribute's type by Namespace name.

[Android.Runtime.Register("getType", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetType_Ljava_lang_String_Ljava_lang_String_Handler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public string? GetType (string? uri, string? localName);
[<Android.Runtime.Register("getType", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetGetType_Ljava_lang_String_Ljava_lang_String_Handler:Org.Xml.Sax.IAttributesInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetType : string * string -> string

Parameters

uri
String

The Namespace URI, or the empty String if the name has no Namespace URI.

localName
String

The local name of the attribute.

Returns

The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed.

Attributes

Remarks

Look up an attribute's type by Namespace name.

See #getType(int) getType(int) for a description of the possible types.

Java documentation for org.xml.sax.Attributes.getType(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