CustomXmlPartCollection

CustomXmlPartCollection class

Represents collection of custom xml parts.

add

NameDescription
add(String)Adds new custom xml part.

Parameters:

NameTypeDescription
xmlStringStringThe xml string of new part to be added.

Result: CustomXmlPart

Error

ErrorCondition
com.aspose.ms.System.ArgumentExceptionxmlString is empty or xml-data is invalid.

add

NameDescription
add(byte[])Adds new custom xml part.

Parameters:

NameTypeDescription
xmlDatabyte[]The xml data of new part to be added.

Result: CustomXmlPart

Error

ErrorCondition
com.aspose.ms.System.ArgumentExceptionxmlData is empty or invalid.

addFromBytes

NameDescription
addFromBytes (Bytes[])Adds new custom xml part.

Parameters:

NameTypeDescription
inputStreamBytes[]The inputStream with xml data of new part to be added.

Result: CustomXmlPart

Error

ErrorCondition
com.aspose.ms.System.ArgumentExceptionData in inputStream is empty or invalid.

clear

NameDescription
clear()Removes all items from the collection.

getSyncRoot

NameDescription
getSyncRoot()Returns a synchronization root. Read-only Object.

Result: Object


get_Item

NameDescription
get_Item(int)Returns the element at the specified index.

Parameters:

NameTypeDescription
indexintThe zero-based index of the element to get.

Result: CustomXmlPart

Error

ErrorCondition
com.aspose.ms.System.ArgumentOutOfRangeExceptionindex is less than 0.-or-index is equal to or greater than Count

isSynchronized

NameDescription
isSynchronized()Returns a value indicating whether access to the collection is synchronized (thread-safe). Read-only boolean.

Result: boolean


iterator

NameDescription
iterator()Returns an enumerator that iterates through the collection.

Result:


iteratorJava

NameDescription
iteratorJava()Returns a java iterator for the entire collection.

Result:


remove

NameDescription
remove(CustomXmlPart)Removes the first occurrence of a specific object from the collection.

Parameters:

NameTypeDescription
itemCustomXmlPartThe custom xml part to remove.

Result: boolean

Error

ErrorCondition
com.aspose.ms.System.ArgumentNullExceptionitem is null.

removeAt

NameDescription
removeAt(int)Removes custom xml part at the specified index.

Parameters:

NameTypeDescription
indexintThe zero-based index of the element to remove.

Error

ErrorCondition
com.aspose.ms.System.ArgumentOutOfRangeExceptionindex is less than 0.-or-index is equal to or greater than Count

size

NameDescription
size()Returns count of custom xml parts in the collection. Read-only int.

Result: int