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

getValueFromName Method

Finds the attribute by namespace name and returns the attribute's text value. For ambiguous names, this method returns the value from the first namespace.

[Visual Basic]

Implementation Syntax

Function getValueFromName(ByVal strURI As String,_ 
  ByVal strLocalName As String) As String

Usage Syntax

StrVal = oIVBSAXAttributes.getValueFromName(strURI,strLocalName)

Parameters

strURI
The namespace URI or, if the name has no namespace URI, an empty string.
strLocalName
The local name of the attribute.

Return Values

If failed, raises a trappable error.

[C/C++]

Syntax

HRESULT getValueFromName(
   [in] const wchar_t * pwchUri, 
   [in] int cchUri, 
   [in] const wchar_t * pwchLocalName,
   [in] int cchLocalName,
   [out] const wchar_t ** ppwchValue,
   [out] int * pcchValue);

Parameters

pwchUri [in]
The namespace URI or, if the namespace has no URI, an empty string.
cchUri [in]
The length of the URI string.
pwchLocalName [in]
The local name of the attribute.
cchLocalName [in]
The length of the local name string.
ppwchValue [out]
The string value of the attribute.
pcchValue [out]
The length of the attribute's string value.

Return Values

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