System.Xml.XmlDocument.CreateAttribute Method

Creates an System.Xml.XmlAttribute with the specified qualified name and XmlNode.NamespaceURI.

Syntax

public XmlAttribute CreateAttribute (string qualifiedName, string namespaceURI)

Parameters

qualifiedName
The qualified name of the attribute. If the name contains a colon then the XmlNode.Prefix property will reflect the part of the name preceding the colon and the XmlDocument.LocalName property will reflect the part of the name after the colon.
namespaceURI
The namespaceURI of the attribute. If the qualified name includes a prefix of xmlns, then this parameter must be http://www.w3.org/2000/xmlns/.

Returns

The new XmlAttribute.

Remarks

The XmlAttribute can be added to an System.Xml.XmlElement using the XmlElement.SetAttributeNode(XmlAttribute) method.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0