Expand
XmlQualifiedName Class

Represents an XML qualified name.

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

'Declaration

<SerializableAttribute> _
Public Class XmlQualifiedName
Remarks

An XML qualified name is a namespace qualified local name in the format of namespace:localname.

Because prefixes are only required when XML is persisted or read, they are irrelevant for XmlQualifiedName objects. This class assumes that prefixes are irrelevant. It is the responsibility of the user to ensure the local name does not contain a ":".

Examples

For an example using the XmlQualifiedName class, see XmlSchemaAll.

Inheritance Hierarchy

System.Object
  System.Xml.XmlQualifiedName
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Community ContentAdd
More informative description of XmlQualifiedName Class
See this other description of this class:

http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Xml/types/XmlQualifiedName.html


In particular what I was unable to find until I read through the above linked page is more information about the "Namespace" property.

It sounds like it is suppose to be the namespace URI, but the ToString() and static ToString(name, ns) methods make it seem like it is supposed to be a namespace prefix (alias). The linked page makes it clear that is is supposed to be the namespace URI, and that the string output is for convenience and debugging not actual use in an xml document.

I'm really not sure why the static ToString method exists at all if all it does is return 2 strings concatenated with a ':' in between.

Now a ToString method which takes an XmlNamespaceManager and looks up the prefix for the Namespace would actually be useful.

Page view tracker