Share via


WriteNmToken (Compact 7)

3/12/2014

This method writes out the specified name, guaranteeing 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

This method returns S_OK if no error is generated and returns an error if pwszNmToken is NULL or if the name is not valid.

Remarks

The following code shows the use of WriteNmToken:

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

See Also

Reference

IXmlWriter Methods
IXmlWriter Properties