System::Xml::XmlAttributeCollection 类

XmlAttributeCollection class

表示属性集合,可通过名称或索引访问。

class XmlAttributeCollection : public System::Xml::XmlNamedNodeMap

方法

方法描述
Append(const SharedPtr<XmlAttribute>&)将指定的属性插入为集合中的最后一个节点。
CopyTo(const ArrayPtr<SharedPtr<XmlAttribute>>&, int32_t)将此集合中的所有 XmlAttribute 对象复制到给定的数组中。
idx_get(int32_t)返回具有指定索引的属性。
idx_get(const String&)返回具有指定名称的属性。
idx_get(const String&, const String&)返回具有指定本地名称和命名空间统一资源标识符(URI)的属性。
InsertAfter(const SharedPtr<XmlAttribute>&, const SharedPtr<XmlAttribute>&)在指定的参考属性之后立即插入指定的属性。
InsertBefore(const SharedPtr<XmlAttribute>&, const SharedPtr<XmlAttribute>&)在指定的参考属性之前立即插入指定的属性。
Prepend(const SharedPtr<XmlAttribute>&)将指定的属性插入为集合中的第一个节点。
Remove(const SharedPtr<XmlAttribute>&)从集合中移除指定的属性。
RemoveAll()从集合中移除所有属性。
RemoveAt(int32_t)从集合中移除对应于指定索引的属性。
SetNamedItem(SharedPtr<XmlNode>) override使用其 XmlNode::get_Name 结果添加一个 XmlNode

Typedefs

类型定义描述
Ptr此类实例的共享指针别名。

备注

此类的对象只能使用 System::MakeObject() 函数分配。切勿在栈上或使用 new 运算符创建此类型的实例,因为这会导致运行时错误和/或断言故障。始终将此类包装到 System::SmartPtr 指针中,并使用该指针将其作为参数传递给函数。

另见