getName Method (C-C++)
Returns all information related to the name of an attribute at a given index.
In MSXML 6.0 do not check for Null values in pointers used as output parameters with this method. For more information, see Remarks, below.
HRESULT getName( [in] int nIndex, [out] const wchar_t ** ppwchUri, [out] int * pcchUri) [out] const wchar_t ** ppwchLocalName, [out] int * pcchLocalName, [out] const wchar_t ** ppwchQName, [out] int * pcchQName);
The attribute's index value.
The attribute's URI.
The length of the URI string.
The attribute's local name.
The length of the local name string.
The qualified prefixed name of the attribute.
The length of the qualified name string.
The value returned if successful. Returns the results as a combination of
getQName, with the appropriate parameters either filled in or empty.
The value returned if an internal error occurs.
The value returned if an invalid index is provided.
In MSXML 3.0, a pointer used in an output parameter could have a value of Null. In some cases, this allowed you to limit or scope the output to return only a particular output parameter when other output parameters were not of interest. In MSXML 6.0, pointers to output parameters used with this method are no longer checked for Null values, and you must always get all three output parameter values (i.e., the URI, local name, and QName).
With the current design, a value of Null is treated the same as any other pointer value, which might be incorrect (for example, in the case of a pointer to address 1). It is now left to the individual application to ensure that any pointer used as an output parameter is correct. When writing your application code, ensure that any pointer passed as an output parameter is not Null.
ppwchUri, ppwchLocalName, and
ppwchQName should not be modified or deleted, because this can cause undefined behavior in the SAXp. If you want to preserve the value that was returned in on of the listed parameters, you should make a deep copy.