WriteNmToken (IXmlWriterLite)

 

Writes out the specified name, making sure that the name is a valid NmToken according to the XML specification.

Syntax

  
HRESULT WriteNmToken (const WCHAR * pwszNmToken);  

Arguments

pwszNmToken
The name to write. NULL is not valid.

Return Value

Returns S_OK if no error is generated. Returns an error if pwszNmToken is NULL or the name is not a valid NmToken.

Remarks

If NULL is supplied for the name, an error is returned.

The following example shows the use of WriteNmToken:

if (FAILED(hr = pWriter->WriteNmToken(L"myNmToken")))  
{  
    wprintf(L"Error, Method: WriteNmToken, error is %08.8lx", hr);  
    return -1;  
}  

For a more detailed example of WriteNmToken, see Write an XML Document using XmlLite.

Requirements

Header: XmlLite.h

Library: XmlLite.lib

See Also

IXmlWriterLite Methods