Share via


IAttributes2.IsDeclared Method

Definition

Overloads

IsDeclared(Int32)

Returns false unless the attribute was declared in the DTD.

IsDeclared(String)

Returns false unless the attribute was declared in the DTD.

IsDeclared(String, String)

Returns false unless the attribute was declared in the DTD.

IsDeclared(Int32)

Returns false unless the attribute was declared in the DTD.

[Android.Runtime.Register("isDeclared", "(I)Z", "GetIsDeclared_IHandler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool IsDeclared (int index);
[<Android.Runtime.Register("isDeclared", "(I)Z", "GetIsDeclared_IHandler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member IsDeclared : int -> bool

Parameters

index
Int32

The attribute index (zero-based).

Returns

true if the attribute was declared in the DTD, false otherwise.

Attributes

Exceptions

When the supplied index does not identify an attribute.

Remarks

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

Java documentation for org.xml.sax.ext.Attributes2.isDeclared(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

IsDeclared(String)

Returns false unless the attribute was declared in the DTD.

[Android.Runtime.Register("isDeclared", "(Ljava/lang/String;)Z", "GetIsDeclared_Ljava_lang_String_Handler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool IsDeclared (string? qName);
[<Android.Runtime.Register("isDeclared", "(Ljava/lang/String;)Z", "GetIsDeclared_Ljava_lang_String_Handler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member IsDeclared : string -> bool

Parameters

qName
String

The XML qualified (prefixed) name.

Returns

true if the attribute was declared in the DTD, false otherwise.

Attributes

Exceptions

When the supplied name does not identify an attribute.

Remarks

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

Java documentation for org.xml.sax.ext.Attributes2.isDeclared(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

IsDeclared(String, String)

Returns false unless the attribute was declared in the DTD.

[Android.Runtime.Register("isDeclared", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetIsDeclared_Ljava_lang_String_Ljava_lang_String_Handler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool IsDeclared (string? uri, string? localName);
[<Android.Runtime.Register("isDeclared", "(Ljava/lang/String;Ljava/lang/String;)Z", "GetIsDeclared_Ljava_lang_String_Ljava_lang_String_Handler:Org.Xml.Sax.Ext.IAttributes2Invoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member IsDeclared : string * string -> bool

Parameters

uri
String

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

localName
String

The attribute's local name.

Returns

true if the attribute was declared in the DTD, false otherwise.

Attributes

Exceptions

When the supplied names do not identify an attribute.

Remarks

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's <em>qName</em>.

Java documentation for org.xml.sax.ext.Attributes2.isDeclared(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