CustomXmlPartCollection module

class CustomXmlPartCollection.CustomXmlPartCollection

Bases: IEnumerable

Represents a collection of custom XML parts.

Add(part: CustomXmlPart)

Adds a custom XML part to the collection.

Parameters:

part – The custom XML part to add.

Clear()

Removes all custom XML parts from the collection.

Clone() CustomXmlPartCollection

Creates a new collection that is a copy of the current collection.

Returns:

A new collection that is a copy of the current collection.

property Count: int

Gets the number of custom XML parts in the collection.

GetById(id: str) CustomXmlPart

Gets the custom XML part with the specified ID.

Parameters:

id – The ID of the custom XML part to get.

Returns:

The custom XML part with the specified ID.

GetEnumerator() IEnumerator

Returns an enumerator that iterates through the collection.

Returns:

An enumerator that can be used to iterate through the collection.

RemoveAt(index: int)

Removes the custom XML part at the specified index.

Parameters:

index – The index of the custom XML part to remove.

get_Item(index: int) CustomXmlPart

Gets the custom XML part at the specified index.

Parameters:

index – The index of the custom XML part to get.

Returns:

The custom XML part at the specified index.

set_Item(index: int, value: CustomXmlPart)

Sets the custom XML part at the specified index.

Parameters:
  • index – The index of the custom XML part to set.

  • value – The custom XML part to set.