Method GetType
GetType(Int32)
Look up an attribute's type by index.
Declaration
string GetType(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The attribute index (zero-based). |
Returns
Type | Description |
---|---|
System.String | The attribute's type as a string, or null if the index is out of range. |
Remarks
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".
See Also
GetType(String, String)
Look up an attribute's type by Namespace name.
See GetType(Int32) for a description of the possible types.
Declaration
string GetType(string uri, string localName)
Parameters
Type | Name | Description |
---|---|---|
System.String | uri | The Namespace URI, or the empty String if the name has no Namespace URI. |
System.String | localName | The local name of the attribute. |
Returns
Type | Description |
---|---|
System.String | The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed. |
GetType(String)
Look up an attribute's type by XML qualified (prefixed) name.
See GetType(Int32) for a description of the possible types.
Declaration
string GetType(string qName)
Parameters
Type | Name | Description |
---|---|---|
System.String | qName | The XML qualified name. |
Returns
Type | Description |
---|---|
System.String | The attribute type as a string, or null if the attribute is not in the list or if qualified names are not available. |