Table of contents
TOC
Collapse the table of content
Expand the table of content

CustomXMLPrefixMappings.LookupPrefix Method (Office)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

Syntax

expression. LookupPrefix( NamespaceURI )

expression An expression that returns a CustomXMLPrefixMappings object.

Parameters

NameRequired/OptionalData TypeDescription
NamespaceURIRequiredStringContains the namespace URI.

Return Value

String

Remarks

If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in the namespace manager, the method returns the first prefix that matches the supplied namespace.

Example

The following example retrieves the namespace prefix associated with the namespace URI.

Dim objCustomPrefixMappings As  CustomPrefixMappings 
Dim strNamespacePrefix As String 

' Gets the namespace corresponding to the prefix. 
strNamespacePrefix = objCustomPrefixMappings.LookupPrefix("urn:invoice:namespace") 

See also

Concepts

CustomXMLPrefixMappings Object

Other resources

CustomXMLPrefixMappings Object Members

© 2018 Microsoft