Allows you to get the namespace corresponding to the specified prefix.

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.LookupNamespace(Prefix)

expression An expression that returns a CustomXMLPrefixMappings object.

Parameters

Name Required/Optional Data Type Description
Prefix Required String Contains a prefix in the prefix mapping list.

Return Value
String

Remarks
If no namespace is assigned to the requested prefix, the method returns an empty string ("").

Example
The following example retrieves the namespace corresponding to the prefix argument.

Visual Basic for Applications
Dim objCustomPrefixMappings As CustomPrefixMappings Dim strNamespace As String ' Gets the namespace corresponding to the prefix. strNamespace = objCustomPrefixMappings.LookupNamespace("xs")

See also: