Interface IXMLNamespaces

Namespace
ESRI.ArcGIS.esriSystem
Assembly
ESRI.Server.System.dll

Provides access to members that control XML namespaces.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("032B72DC-E0FB-4BB1-8626-1797E25A72A0")]
public interface IXMLNamespaces

Remarks


Very often a name conflict might occur when two different xml documents use the same name describing two different elements. This is caused because XML element names are not fixed. To avoid this conflict prefix can precede an element name.

For example,
there are two elements <test></test> and <test></test>  in XML document. Prefix is used to make these elements different: <f:test></f:test> and <h:test></h:test>

The namespace attribute is placed in the start tag of an element and has the following syntax: xmlns:prefix="namespace"

For example,
<f:test xmlns:f="xml test">
</f:test>

where "f" is a namespace prefix, and "xml test" is a namespace URI (Unique Resource Identifier).

Use the AddNamespace method to add new napespaces (prefix and namespace URI) to the element, the DeleteNamespace method removes the specified namespace by its URI. The NamespaceCount property returns number of namespaces in the list. The Prefix and the NameSpaceURI properties return the prefix and the URI of the namespace.  











Properties

NamespaceCount

Number of namespaces.

int NamespaceCount { get; }

Property Value

int

NamespaceURI[int]

The namespace URI for a namespace.

string NamespaceURI[int Index] { get; }

Parameters

Index int

Property Value

string

Prefix[int]

The namespace prefix for a namespace.

string Prefix[int Index] { get; }

Parameters

Index int

Property Value

string

Methods

AddNamespace(string, string)

Adds a namespace to the element.

void AddNamespace(string Prefix, string uri)

Parameters

Prefix string
uri string

DeleteNamespace(string)

Deletes a namespace from the element.

void DeleteNamespace(string uri)

Parameters

uri string