[#BloombergLP-balxml-Reader-lookupAttribute-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Reader.adoc[Reader]::lookupAttribute
:relfileprefix: ../../../
:mrdocs:

`lookupAttribute` overloads

== Synopses

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

Find the attribute at the specified `index` in the current node, and fill in the specified `attribute` structure&period; Return 0 on success, 1 if no attribute is found at the `index`, and an a negative value otherwise&period; The strings that were filled into the `attribute` structure are invalid upon the next `advanceToNextNode` or `close` is called&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/Reader/lookupAttribute-0a.adoc[lookupAttribute](
    xref:BloombergLP/balxml/ElementAttribute.adoc[ElementAttribute]* attribute,
    int index) const = 0;
----

[.small]#xref:BloombergLP/balxml/Reader/lookupAttribute-0a.adoc[_» more&period;&period;&period;_]#

Find the attribute with the specified `qname` (qualified name) in the current node, and fill in the specified `attribute` structure&period; Return 0 on success, 1 if there is no attribute found with `qname`, and a negative value otherwise&period; The strings that were filled into the `attribute` structure are invalid upon the next `advanceToNextNode` or `close` is called&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/Reader/lookupAttribute-09.adoc[lookupAttribute](
    xref:BloombergLP/balxml/ElementAttribute.adoc[ElementAttribute]* attribute,
    char const* qname) const = 0;
----

[.small]#xref:BloombergLP/balxml/Reader/lookupAttribute-09.adoc[_» more&period;&period;&period;_]#

Find the attribute with the specified `localName` and specified `namespaceId` in the current node, and fill in the specified `attribute` structure&period; Return 0 on success, 1 if there is no attribute found with `localName` and `namespaceId`, and a negative value otherwise&period; If `namespaceId` &equals;&equals; &hyphen;1, then the document&apos;s default namespace will be used&period; The strings that were filled into the `attribute` structure are invalid upon the next `advanceToNextNode` or `close` is called&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/Reader/lookupAttribute-0c.adoc[lookupAttribute](
    xref:BloombergLP/balxml/ElementAttribute.adoc[ElementAttribute]* attribute,
    char const* localName,
    int namespaceId) const = 0;
----

[.small]#xref:BloombergLP/balxml/Reader/lookupAttribute-0c.adoc[_» more&period;&period;&period;_]#

Find the attribute with the specified `localName` and specified `namespaceUri` in the current node, and fill in the specified `attribute` structure&period; Return 0 on success, 1 if there is no attribute found with `localName` and `namespaceUri`, and a negative value otherwise&period; If `namespaceUri` &equals;&equals; 0 or a blank string is passed, then the document&apos;s default namespace will be used&period; The strings that were filled into the `attribute` structure are invalid upon the next `advanceToNextNode` or `close` is called&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
int
xref:BloombergLP/balxml/Reader/lookupAttribute-06.adoc[lookupAttribute](
    xref:BloombergLP/balxml/ElementAttribute.adoc[ElementAttribute]* attribute,
    char const* localName,
    char const* namespaceUri) const = 0;
----

[.small]#xref:BloombergLP/balxml/Reader/lookupAttribute-06.adoc[_» more&period;&period;&period;_]#


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