[#BloombergLP-balxml-PrefixStack-namespaceIdByIndex]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/PrefixStack.adoc[PrefixStack]::namespaceIdByIndex
:relfileprefix: ../../../
:mrdocs:

Return the namespace ID at the specified `index`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
namespaceIdByIndex(int index) const;
----

== Description

Return the namespace ID at the specified `index` in the prefix stack&period;

Return the namespace ID at the specified `index` in the prefix stack, where an `index` of 0 is the oldest ID on the stack&period; If `index` is negative, return the ID at position &apos;numPrefixes() &hyphen; index&apos;&period; Thus, an `index` of &hyphen;1 will return the most recent ID on the stack (i&period;e&period;, the top of the stack)&period; The behavior is undefined if `index &gt; numPrefixes()` or `index &lt; &hyphen;numPrefixes()`&period;

== Return Value

namespace ID at `index`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *index*
| stack index (negative indexes from the top)
|===


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