[#BloombergLP-balxml-NamespaceRegistry-lookup-0c]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/NamespaceRegistry.adoc[NamespaceRegistry]::lookup
:relfileprefix: ../../../
:mrdocs:

Return the integer ID for the specified `namespaceUri` or &hyphen;1 if the namespace has not been registered&period; Note that not all negative return values correspond to unregistered namespaces&period; Preregistered namespaces always have negative IDs&period; (See &quot;Preregistered Namespaces&quot; in the `balxml&lowbar;namespaceregistry` component&hyphen;level documentation&period;) Note that a return value of &hyphen;1 can mean either an unregistered namespace or an empty URI string&period; This dual&hyphen;use of &hyphen;1 is deliberate and simplifies error handling in most clients&period;

== Synopsis

Declared in `&lt;balxml&lowbar;namespaceregistry&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
lookup(std::string&lowbar;view const& namespaceUri) const;
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
