public class CustomXmlPartCollection
extends java.lang.Object
implements java.lang.Iterable
CustomXmlPart objects.
To learn more, visit the Structured Document Tags or Content Control documentation article.
You do not normally need to create instances of this class. You can access custom XML data stored in a document via the Document.getCustomXmlParts() / Document.setCustomXmlParts(com.aspose.words.CustomXmlPartCollection) property.
| Modifier and Type | Method and Description |
|---|---|
void |
add(CustomXmlPart part)
Adds an item to the collection.
|
CustomXmlPart |
add(java.lang.String id,
java.lang.String xml)
Creates a new XML part with the specified XML and adds it to the collection.
|
void |
clear()
Removes all elements from the collection.
|
CustomXmlPartCollection |
deepClone()
Makes a deep copy of this collection and its items.
|
CustomXmlPart |
get(int index)
Gets an item at the specified index.
|
CustomXmlPart |
getById(java.lang.String id)
Finds and returns a custom XML part by its identifier.
|
int |
getCount()
Gets the number of elements contained in the collection.
|
java.util.Iterator |
iterator()
Returns an iterator object that can be used to iterate over all items in the collection.
|
void |
removeAt(int index)
Removes an item at the specified index.
|
void |
set(int index,
CustomXmlPart value)
Sets an item at the specified index.
|
public int getCount()
public CustomXmlPart get(int index)
index - Zero-based index of the item.public void set(int index,
CustomXmlPart value)
index - Zero-based index of the item.value - An item at the specified index.public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic void add(CustomXmlPart part)
part - The custom XML part to add.public CustomXmlPart add(java.lang.String id, java.lang.String xml)
id - Identifier of a new custom XML part.xml - XML data of the part.public void removeAt(int index)
index - The zero based index.public void clear()
public CustomXmlPart getById(java.lang.String id)
id - Case-sensitive string that identifies the custom XML part.null if a custom XML part with the specified identifier is not found.public CustomXmlPartCollection deepClone()