getIndexFromQName Method

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - SAX2 Reference

getIndexFromQName Method

Finds an attribute by XML 1.0 qualified name (QName) and returns the (zero-based) index for the attribute. For ambiguous names, this method returns the name from the first namespace.

[Visual Basic]

Implementation Syntax

Function getIndexFromQName(ByVal strQName As String) As Long

Usage Syntax

StrVal= oIVBSAXAttributes.getIndexFromQName(strQName)

Parameters

strQName
The qualified name for the attribute.

Return Values

If failed, raises a trappable error.

[C/C++]

Syntax

HRESULT getIndexFromQName(
   [in] const wchar_t * pwchQName, 
   [in] int cchQName, 
   [out, retval] int * pnIndex);

Parameters

pwchQName [in]
The qualified name for the attribute.
cchQName[in]
The length of the qualified name string.
pnIndex[out, retval]
The returned index value.

Return Values

S_OK
The value returned if the index value is returned successfully.
E_INVALIDARG
The value returned if no matching attribute is found.
E_FAIL
The value returned if an internal error occurs.

To view reference information for Visual Basic or C/C++ only, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

getLength Method (C/C++) | length Property (Visual Basic)

Applies to: ISAXAttributes/IVBSAXAttributes Interface