Mono Class Library: System.Xml.XmlTextWriter Overview | Members

System.Xml.XmlTextWriter.WriteQualifiedName Method

Writes out the qualified name.

public override void WriteQualifiedName (string localName, string ns)

Parameters

localName
A string specifying the local name to write.
ns
A string specifying the namespace URI to associate with localname.
ns
Documentation for this section has not yet been entered.

Exceptions

TypeReason
ArgumentException

localName is null or string.Empty.

-or-

XmlTextWriter.Namespaces is false, and ns is neither null nor string.Empty .

-or-

localName is not a valid XML name.

InvalidOperationExceptionThe XmlTextWriter.WriteState is WriteState.Closed.
System.Xml.XmlExceptionlocalName is not a valid XML name.

Remarks

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, this method throws an exception if ns is not found.

If the current instance supports namespaces (XmlTextWriter.Namespaces is set to true), this method looks up the prefix that is in scope for the given namespace and checks that the name is valid according to the W3C Namespaces in XML recommendation (http://www.w3.org/TR/REC-xml-names).

Note:

This method overrides XmlWriter.WriteQualifiedName(string, string).

Requirements

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