
## CustomXmlPartCollection class

Represents a collection of Custom XML Parts. The items are [CustomXmlPart](../customxmlpart/) objects.
To learn more, visit the [Structured Document Tags or Content Control](https://docs.aspose.com/words/python-net/working-with-content-control-sdt/) documentation article.




### Remarks

You do not normally need to create instances of this class. You can access custom XML data
stored in a document via the [Document.custom_xml_parts](../../aspose.words/document/custom_xml_parts/) property.




### Constructors
| Name | Description |
| --- | --- |
| [CustomXmlPartCollection()](./__init__/#default) | The default constructor. |

### Indexers

| Name | Description |
| --- | --- |
| [``__getitem__(index)``](./__getitem__/#int) | Gets or sets an item at the specified index. |

### Properties

| Name | Description |
| --- | --- |
| [count](./count/) | Gets the number of elements contained in the collection. |

### Methods

| Name | Description |
| --- | --- |
|[ add(part)](./add/#customxmlpart) | Adds an item to the collection. |
|[ add(id, xml)](./add/#str_str) | Creates a new XML part with the specified XML and adds it to the collection. |
|[ clear()](./clear/#default) | Removes all elements from the collection. |
|[ clone()](./clone/#default) | Makes a deep copy of this collection and its items. |
|[ get_by_id(id)](./get_by_id/#str) | Finds and returns a custom XML part by its identifier. |
|[ remove_at(index)](./remove_at/#int) | Removes an item at the specified index. |

### See Also

* module [aspose.words.markup](../)
* class [CustomXmlPart](../customxmlpart/)
* property [Document.custom_xml_parts](../../aspose.words/document/custom_xml_parts/)

