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.

Returns: 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.

Returns: CustomXmlPart

Error

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

addFromStream

NameDescription
addFromStream (CustomXmlPartCollection, ReadStream, Function)Adds new custom xml part.

Parameters:

NameTypeDescription
customxmlpartcollectionCustomXmlPartCollectionlink to self
inputStreamReadStreamThe inputStream with xml data of new part to be added.
callbackFunctioncallback(error, Returns) - Callback to be called when the method has completed

Returns: 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.

Returns: 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.

Returns: 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.

Returns: boolean


iterator

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

Returns:


iteratorJava

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

Returns:


remove

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

Parameters:

NameTypeDescription
itemCustomXmlPartThe custom xml part to remove.

Returns: 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.

Returns: int