다음을 통해 공유


WriteRawChars

 

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

Syntax

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

Arguments

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

count
The number of characters to write.

Return Value

Returns S_OK if no error is generated.

Remarks

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.

Requirements

Header: XmlLite.h

Library: XmlLite.lib

See Also

IXmlWriter Methods