Export (0) Print
Expand All

getIndexFromName Method

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

Function getIndexFromName(ByVal strURI As String, ByVal strLocalName As _ 
String) As Long

StrVal = oIVBSAXAttributes.getIndexFromName(strURI, strLocalName)

Parameters

strURI

The namespace URI or, if the name has no namespace URI, an empty string.

strLocalName

The attribute's local name.

Return Values

If failed, raises a trappable error.

HRESULT getIndexFromName(
   [in] const wchar_t * pwchUri, 
   [in] int cchUri, 
   [in] const wchar_t * pwchLocalName, 
   [in] int cchLocalName
   [out, retval] int * pnIndex);

Parameters

pwchUri[in]

The namespace URI or, if the name has no namespace URI, an empty string.

cchUri[in]

The length of the namespace URI string.

pwchLocalName[in]

The attribute's local name.

cchLocalName[in]

The length of the local 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.

Implemented in: MSXML 3.0 and later

Show:
© 2014 Microsoft