Class

# XMLContentModel

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

## Description

Represents a parsed DTD element declaration. Expat defines this structure and <span class="title-ref">XMLContentModel</span> is a direct representation of it. It is passed to the ElementDecl event of `XMLReader</api/text/xml/xmlreader>`. This will be useful to anyone building DTD validation routines.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                       | Type                               | Read-Only | Shared |
|--------------------------------------------|------------------------------------|-----------|--------|
| `Name<xmlcontentmodel.name>`               | `String</api/data_types/string>`   |           |        |
| `NumChildren<xmlcontentmodel.numchildren>` | `Integer</api/data_types/integer>` |           |        |
| `Quant<xmlcontentmodel.quant>`             | `Integer</api/data_types/integer>` |           |        |
| `Type<xmlcontentmodel.type>`               | `Integer</api/data_types/integer>` |           |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                           | Parameters                                  | Returns         | Shared |
|--------------------------------|---------------------------------------------|-----------------|--------|
| `Child<xmlcontentmodel.child>` | Index As `Integer</api/data_types/integer>` | XMLContentModel |        |

## Constants

Type

Here are the constants that can be compared to the value of the Type property:

| Value | Constant         |
|-------|------------------|
| 1     | XML_CTYPE_EMPTY  |
| 2     | XML_CTYPE_ANY    |
| 3     | XML_CTYPE_MIXED  |
| 4     | XML_CTYPE_NAME   |
| 5     | XML_CTYPE_CHOICE |
| 6     | XML_CYTPE_SEQ    |

Quant

Here are the constants that can be compared to the value of the Quant property:

| Value | Constant        |
|-------|-----------------|
| 0     | XML_CQUANT_NONE |
| 1     | XML_CQUANT_OPT  |
| 2     | XML_CQUANT_REP  |
| 3     | XML_CQUANT_PLUS |

## Property descriptions

<div id="xmlcontentmodel.name">

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

</div>

<div class="rst-class">

forsearch

</div>

XMLContentModel.Name

**Name** As `String</api/data_types/string>`

> The name of the item.

<div id="xmlcontentmodel.numchildren">

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

</div>

<div class="rst-class">

forsearch

</div>

XMLContentModel.NumChildren

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

> The number of children.

<div id="xmlcontentmodel.quant">

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

</div>

<div class="rst-class">

forsearch

</div>

XMLContentModel.Quant

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

> XML Content Quant.
>
> Here are the constants that can be compared to the value of the Quant property:
>
> | Value | Constant        |
> |-------|-----------------|
> | 0     | XML_CQUANT_NONE |
> | 1     | XML_CQUANT_OPT  |
> | 2     | XML_CQUANT_REP  |
> | 3     | XML_CQUANT_PLUS |

<div id="xmlcontentmodel.type">

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

</div>

<div class="rst-class">

forsearch

</div>

XMLContentModel.Type

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

> XML content type.
>
> Here are the constants that can be compared to the value of the Type property:
>
> | Value | Constant         |
> |-------|------------------|
> | 1     | XML_CTYPE_EMPTY  |
> | 2     | XML_CTYPE_ANY    |
> | 3     | XML_CTYPE_MIXED  |
> | 4     | XML_CTYPE_NAME   |
> | 5     | XML_CTYPE_CHOICE |
> | 6     | XML_CYTPE_SEQ    |

## Method descriptions

<div id="xmlcontentmodel.child">

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

</div>

<div class="rst-class">

forsearch

</div>

XMLContentModel.Child

**Child**(Index As `Integer</api/data_types/integer>`) As XMLContentModel

> Returns an <span class="title-ref">XMLContentModel</span>.

## Notes

If Type is XML_CTYPE_EMPTY or XML_CTYPE_ANY then quant will be XML_CQUANT_NONE and the other fields will be zero or NULL. If Type is XML_CTYPE_MIXED, then quant will be None or REP and numChildren will contain the number of elements that may be mixed in and children point to an array of XMLContent cells that will be all of XML_CTYPE_NAME type with no quantification.

If Type is XML_CTYPE_NAME, then the name points to the name and the numChildren field will be zero and children will be NULL. The quant fields indicate any quantifiers placed on the name.

CHOICE and SEQ will have name NULL, the number of children in numChildren and children will point, recursively, to an array of XMLContent cells.

The EMPTY, ANY, and MIXED types will occur only at the top level.

## 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>
