CustomXMLPrefixMappings.AddNamespace Method
Allows you to add a custom namespace/prefix mapping to use when querying an item.
Note
|
|---|
| References to DTDs from custom XML parts are not supported. DTD references in custom XML parts will not resolve, and custom XML parts containing DTD references generate an exception when an attempt is made to save the file's content to a flat XML file. |
Syntax
expression.AddNamespace(Prefix, NamespaceURI)
expression An expression that returns a CustomXMLPrefixMappings object.
Parameters
| Name | Required/Optional | Data Type | Description |
|---|---|---|---|
| Prefix | Required | String | Contains the prefix to add to the prefix mapping list. |
| NamespaceURI | Required | String | Contains the namespace to assign to the newly added prefix. |
Remarks
If the prefix already exists in the Namespace Manager, this method will overwrite the meaning of that prefix except when the prefix is one added or used by the data store (IXMLDataStore interface) internally, in which case it will return an error.
Example
The following example adds a prefix and namespace to a CustomPrefixMappings object.
| Visual Basic for Applications |
|---|
|
Note