CustomXmlPartCollection

CustomXmlPartCollection

概述

CustomXmlPartCollection 是 Aspose.Words FOSS 中用于 .NET 的类。继承自:IEnumerable<CustomXmlPart>。

表示一组自定义 XML 部件。

此类提供 7 种方法,用于在 .NET 程序中处理 CustomXmlPartCollection 对象。可用的方法包括:Add、Clear、Clone、GetById、GetEnumerator、RemoveAt。在安装 Aspose.Words FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:Count。

属性

名称类型访问描述
Countint读取获取集合中包含的元素数量。

方法

签名描述
GetEnumerator()返回一个 enumeratoriteratorenumerator 对象,可用于遍历集合中的所有项。
Add(part: CustomXmlPart)向集合中添加一个项。
Add(id: string, xml: string)使用指定的 XML 创建一个新的 XML 部件,并将其添加到集合中。
RemoveAt(index: int)在指定索引处移除一个项目。
Clear()从集合中移除所有元素。
GetById(id: string)通过其标识符查找并返回自定义的 XML 部件。
Clone()对该集合及其项进行深拷贝。

另请参阅

 中文