WSDXML_NAMESPACE structure (wsdxmldom.h)

Specifies an XML namespace.


typedef struct _WSDXML_NAMESPACE {
  const WCHAR *Uri;
  const WCHAR *PreferredPrefix;
  WORD        NamesCount;
  WORD        Encoding;



The URI that identifies the namespace.


The preferred prefix to be used in XML prefix mappings.


Reference to an array of WSDXML_NAME structures that specify the names in the namespace.


The number of names in the Names array.


The encoded reference for the namespace.


WSDXML_NAMESPACE represents the association between a namespace URI and a list of names belonging to that namespace. Additionally, it provides a PreferredPrefix for the namespace, which gives guidance on the default prefix to use for a specified namespace. In the context of WSDAPI, there are two types of namespaces: static namespaces and dynamic namespaces.

Static namespaces are user provided, well known, and assumed to be complete namespaces, in that all names belonging to the namespace should be in names array. When processing a received XML document, any element or attribute in the document that claims to be in a static namespace but has a name not listed in that namespace is treated as an error. Static namespaces are typically generated pre-compile time, by a tool like WSDCodeGen.

Dynamic namespaces are generated by WSDAPI. These are built when new namespaces are seen in XML documents. With dynamic namespaces, no assumptions can be made about whether a specified name actually belongs to the formal namespace or not, so all names are accepted as being part of the namespace. As such, dynamic namespaces expand the Names array as they process new names in a specified document.


Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header wsdxmldom.h