WriteRawChars

Writes out raw markup manually. Using this method allows an application to avoid creating entities for special characters.


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

Pointer to the characters to write. NULL is valid only if count is zero.

count

The number of characters to write.

Returns S_OK if no error is generated.

Writes nothing if the count parameter is 0 or if the characters parameter is NULL.

The following code shows the use of WriteRawChars:

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

For a more detailed example of WriteRawChars, see Writing an XML Document Using XmlLite.

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

Header: XmlLite.h

Library: XmlLite.lib

Show:
© 2014 Microsoft. All rights reserved.