Share via


WriteRawChars (Compact 7)

3/12/2014

This method manually writes out raw markup. You can use this method to let an application avoid creating entities for special characters.

Syntax

HRESULT WriteRawChars (
    const WCHAR* characters, 
    UINT count
);

Parameters

  • characters
    Pointer to the characters to write. NULL is valid only if count is zero.
  • Count
    The number of characters to write.

Return Value

This method returns S_OK if no error is generated.

Remarks

This method writes nothing if the count parameter is 0 or if the characters parameter is NULL.

The following code shows using WriteRawChars:

if (FAILED(hr = pWriter->WriteRawChars(L"<rawCharacters/>", 16)))
{
    wprintf(L"Error, Method: WriteRawChars, error is %08.8lx", hr);
    return -1;
}

Be aware that the writer will not check whether the written text is well-formed XML in the current context.

See Also

Reference

IXmlWriter Methods
IXmlWriter Properties