Class

# XMLAttributeList

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

A helper class that is used in the `XMLReader's</api/text/xml/xmlreader>` StartElement event and the `XMLXsltHandler's</api/text/xml/xmlxslthandler>` StartElement event. A basic structure for a collection of attributes. The attributes can be retrieved by index or name.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                            | Type                               | Read-Only | Shared |
|---------------------------------|------------------------------------|-----------|--------|
| `Count<xmlattributelist.count>` | `Integer</api/data_types/integer>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                            | Parameters                                  | Returns                          | Shared |
|---------------------------------|---------------------------------------------|----------------------------------|--------|
| `Key<xmlattributelist.key>`     | index As `Integer</api/data_types/integer>` | `String</api/data_types/string>` |        |
| `Value<xmlattributelist.value>` | index As `Integer</api/data_types/integer>` | `String</api/data_types/string>` |        |
|                                 | key As `String</api/data_types/string>`     | `String</api/data_types/string>` |        |

## Property descriptions

<div id="xmlattributelist.count">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

XMLAttributeList.Count

**Count** As `Integer</api/data_types/integer>`

> The number of attributes in the list.

## Method descriptions

<div id="xmlattributelist.key">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

XMLAttributeList.Key

**Key**(index As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> Retrieves an attribute by *index* position. Key returns the attribute as a `String</api/data_types/string>`. *Index* is zero-based.

<div id="xmlattributelist.value">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

XMLAttributeList.Value

**Value**(index As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> Retrieves an attribute value looking it up by the *index*.

**Value**(key As `String</api/data_types/string>`) As `String</api/data_types/string>`

> Retrieves an attribute value looking it up by the *key*. If *key* is not an attribute in the list, then the empty string is returned.

## Compatibility

|                       |     |
|-----------------------|-----|
| **Project Types**     | All |
| **Operating Systems** | All |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `XMLReader</api/text/xml/xmlreader>` class.

</div>
