set_Prefix()

XmlAttribute::set_Prefix(String) method

Sets the namespace prefix of this node.

void System::Xml::XmlAttribute::set_Prefix(String value) override

Arguments

ParameterTypeDescription
valueStringThe value to set.

Exceptions

ExceptionDescription
ArgumentExceptionThis node is read-only.
XmlExceptionThe specified prefix contains an invalid character. The specified prefix is malformed. The namespaceURI of this node is nullptr. The specified prefix is “xml”, and the namespaceURI of this node is different from “http://www.w3.org/XML/1998/namespace". This node is an attribute, the specified prefix is “xmlns”, and the namespaceURI of this node is different from “http://www.w3.org/2000/xmlns/". This node is an attribute, and the qualifiedName of this node is “xmlns” [Namespaces].

See Also