Export (0) Print
Expand All

XmlWriter.WriteQualifiedName Method

When overridden in a derived class, writes out the namespace-qualified name. This method looks up the prefix that is in scope for the given namespace.

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

public virtual void WriteQualifiedName(
	string localName,
	string ns
)

Parameters

localName
Type: System.String
The local name to write.
ns
Type: System.String
The namespace URI for the name.

ExceptionCondition
ArgumentException

localName is String.Empty or not a valid name.

NullReferenceException

localName or ns is null.

If ns maps to the current default namespace, no prefix is generated.

When writing attribute values, this method generates a prefix if ns is not found. When writing element content, it throws an exception if ns is not found.

NoteNote:

If a class derived from the XmlWriter does not override this method localName is not checked to be a valid W3C XML name. In such case, before calling this method, the validity of the string can be checked by IsName method.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft