Share via


getURI Method

 

Finds an attribute's namespace URI by index.

Visual Basic Implementation Syntax

Function getURI(ByVal nIndex As Long) As String  

Visual Basic Usage Syntax

StrVal = oIVBSAXAttributes.getURI
(nIndex)  

Parameters

nIndex
The attribute's index (zero-based).

Return Values

If a namespace URI is not available, returns an empty string

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

Returns all the information related to the name of the attribute available at the index. Each return string can be disabled by passing Null in for the text out parameter. It is an error to pass Null for the character count unless Null is also passed for the corresponding text out parameter.

C/C+ Syntax

HRESULT getURI(  
   [in] int nIndex,   
   [out] const wchar_t ** ppwchUri,  
   [out] int * pcchUri);  

Parameters

nIndex[in]
The attribute's index (zero-based).

ppwchUri[out]
The namespace URI. ppwchUri should not be modified or deleted, because this can cause undefined behavior in the SAX parser. If you want to preserve the value that was returned in ppwchUri, you should make a deep copy.

pcchUri[out]
The length of the namespace URI.

Return Values

S_OK
The value returned if the URI is returned successfully.

E_INVALIDARG
The value returned for an invalid index or if no matching attribute is found.

E_FAIL
The value returned if an internal error occurs.

Versioning

Implemented in: MSXML 3.0 and later

Applies to

ISAXAttributes Interface

See Also

getLength Method (C-C++)
length Property (Visual Basic)