getURI Method (C++)
Returns the namespace URI for the provided prefix in a current context or DOM node context. If the DOM node is Null, it uses the current context.
C/C++ Syntax
HRESULT _getURI [in] const wchar_t* pwchPrefix, [in] IXMLDOMNode* pContextNode, [in, out] wchar_t* pwchUri, [in, out] int* pcchUri);
Parameters
- pwchPrefix[in]
- The prefix associated with the namespace URI.
- pContextNode[in]
- The provided DOM node.
- pwchUri[in,out]
- The returned namespace URI value. The buffer length on input contains the maximum length of the buffer. On output (for successful calls), the returned buffer contains the length of the namespace URI string. If the buffer is NULL, only the length is returned.
- pcchUri[in,out]
- The length of the namespace URI.
C/C++ Return Values
- S_OK
- The value returned if successful.
- E_INVALIDARG
- The
pwchUri
parameter is an empty string. No prefix can be bound to an empty string. - E_FAIL
- The value returned if the index is out of bounds.
- E_XML_BUFFERTOOSMALL
- The MSXML error code for insufficient return buffer length.
- E_POINTER
- The value returned if
pcchURI
is NULL.
Remarks
- Return values stored in a character buffer are null-terminated wide strings that are accompanied by the
pcchUri
parameter. ThepcchUri
, parameter specifies the length of the buffer on input and returns the length of the result on output. The length of the result is returned as a null-terminated string in characters. If the pointer to the buffer is NULL, thegetURI
method returns only length.
See Also
Applies to: IMXNamespaceManager