Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Writes out the specified name, making sure that the name is valid according to the XML specification.
Syntax
HRESULT WriteName (const WCHAR * pwszName);
Arguments
pwszName
The name to write. NULL is not valid.
Return Value
Returns S_OK if no error is generated. Returns an error if pwszName
is NULL or the name is not valid. An example of a non-valid name is one that starts with a colon (":
").
Remarks
WriteName
makes sure that the name is valid according to the Namespaces in XML specification.
The following example shows the use of WriteName
:
if (FAILED(hr = pWriter->WriteName(L"myName")))
{
wprintf(L"Error, Method: WriteName, error is %08.8lx", hr);
return -1;
}
For a more detailed example of WriteName
, see Write an XML Document using XmlLite.
Requirements
Header: XmlLite.h
Library: XmlLite.lib