Export (0) Print
Expand All

XmlDocument.CreateAttribute Method (String, String)

Creates an XmlAttribute with the specified qualified name and NamespaceURI.

Namespace: System.Xml
Assembly: System.Xml (in system.xml.dll)

public XmlAttribute CreateAttribute (
	string qualifiedName,
	string namespaceURI
)
public XmlAttribute CreateAttribute (
	String qualifiedName, 
	String namespaceURI
)
public function CreateAttribute (
	qualifiedName : String, 
	namespaceURI : String
) : XmlAttribute

Parameters

qualifiedName

The qualified name of the attribute. If the name contains a colon then the Prefix property will reflect the part of the name preceding the colon and the 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/.

Return Value

The new XmlAttribute.

The XmlAttribute can be added to an XmlElement using the SetAttributeNode method.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft