XmlWriter::WriteAttributeString(const String&, const String&, const String&) method
When overridden in a derived class, writes an attribute with the specified local name, namespace URI, and value.
void System::Xml::XmlWriter::WriteAttributeString(const String &localName, const String &ns, const String &value)
Arguments
| Parameter | Type | Description |
|---|
| localName | const String& | The local name of the attribute. |
| ns | const String& | The namespace URI to associate with the attribute. |
| value | const String& | The value of the attribute. |
Exceptions
| Exception | Description |
|---|
| InvalidOperationException | The state of writer is not WriteState::Element or writer is closed. |
| ArgumentException | The xml:space or xml:lang attribute value is invalid. |
XmlWriter::WriteAttributeString(const String&, const String&) method
When overridden in a derived class, writes out the attribute with the specified local name and value.
void System::Xml::XmlWriter::WriteAttributeString(const String &localName, const String &value)
Arguments
| Parameter | Type | Description |
|---|
| localName | const String& | The local name of the attribute. |
| value | const String& | The value of the attribute. |
Exceptions
| Exception | Description |
|---|
| InvalidOperationException | The state of writer is not WriteState::Element or writer is closed. |
| ArgumentException | The xml:space or xml:lang attribute value is invalid. |
XmlWriter::WriteAttributeString(const String&, const String&, const String&, const String&) method
When overridden in a derived class, writes out the attribute with the specified prefix, local name, namespace URI, and value.
void System::Xml::XmlWriter::WriteAttributeString(const String &prefix, const String &localName, const String &ns, const String &value)
Arguments
| Parameter | Type | Description |
|---|
| prefix | const String& | The namespace prefix of the attribute. |
| localName | const String& | The local name of the attribute. |
| ns | const String& | The namespace URI of the attribute. |
| value | const String& | The value of the attribute. |
Exceptions
| Exception | Description |
|---|
| InvalidOperationException | The state of writer is not WriteState::Element or writer is closed. |
| ArgumentException | The xml:space or xml:lang attribute value is invalid. |
| XmlException | The localName or ns is nullptr. |
See Also