System::Xml::XmlReader::GetAttribute 方法

XmlReader::GetAttribute(int32_t) method

当在派生类中被重写时,获取具有指定索引的属性的值。

virtual String System::Xml::XmlReader::GetAttribute(int32_t i)=0
参数类型描述
iint32_t属性的索引。索引从零开始。(第一个属性的索引为 0。)

ReturnValue

指定属性的值。此方法不会移动读取器。

另见

XmlReader::GetAttribute(String) method

当在派生类中被重写时,获取具有指定 XmlReader::get_Name 值的属性值。

virtual String System::Xml::XmlReader::GetAttribute(String name)=0
参数类型描述
名称String属性的限定名称。

ReturnValue

指定属性的值。如果未找到属性或其值为 String::Empty,则返回 nullptr

另见

XmlReader::GetAttribute(String, String) method

当在派生类中被重写时,获取具有指定 XmlReader::get_LocalNameXmlReader::get_NamespaceURI 值的属性值。

virtual String System::Xml::XmlReader::GetAttribute(String name, String namespaceURI)=0
参数类型描述
名称String属性的本地名称。
namespaceURIString属性的命名空间 URI。

ReturnValue

指定属性的值。如果未找到属性或其值为 String::Empty,则返回 nullptr。此方法不会移动读取器。

另见