## XmlElement::SetAttribute(String, String, String) method


设置具有指定本地名称和命名空间 URI 的属性的值。

```cpp
virtual String System::Xml::XmlElement::SetAttribute(String localName, String namespaceURI, String value)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| localName | 字符串 | 属性的本地名称。 |
| namespaceURI | 字符串 | 属性的命名空间 URI。 |
| value | 字符串 | 要为属性设置的值。 |

### ReturnValue

属性值。

## 另见

* Class [String](../../../system/string/)
* Class [XmlElement](../)
* Namespace [System::Xml](../../)
* Library [Aspose.Page for C++](../../../)
## XmlElement::SetAttribute(String, String) method


设置具有指定名称的属性的值。

```cpp
virtual void System::Xml::XmlElement::SetAttribute(String name, String value)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| name | 字符串 | 要创建或修改的属性名称。这是一个限定名称。如果名称包含冒号，则会解析为前缀和本地名称部分。 |
| value | 字符串 | 要为属性设置的值。 |

## 另见

* Class [String](../../../system/string/)
* Class [XmlElement](../)
* Namespace [System::Xml](../../)
* Library [Aspose.Page for C++](../../../)
