getValue Method

MSXML 5.0 SDK

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

getValue Method

Returns the text value of the attribute.

[Visual Basic]

If the index is out of range, this method returns a trappable error.

Implementation Syntax

Function getValue(ByVal nIndex As Long) As String

Usage Syntax

StrVal = oIVBSAXAttributes.getValue(nIndex)

Parameters

nIndex
The attribute index (zero-based).

Return Values

If failed, raises a trappable error if the index is out of range.

[C/C++]

If the index is out of range, this method returns a Null value.

Syntax

HRESULT getValue(
   [in] int nIndex, 
   [out] const wchar_t ** ppwchValue, 
   [out] int * pcchValue);

Parameters

nIndex [in]
The attribute index (zero-based).
ppwchValue [out]
The string value of the attribute.
pcchValue [out]
The length of the attribute string.

Return Values

S_OK
The value returned if the text value is returned successfully.
E_INVALIDARG
The value returned if an invalid index or no matching attribute is reported.
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