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 Write 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

IXmlWriter Methods

Show: