WriteRaw (IXmlWriterLite)

 

Enables the caller to write out raw markup manually. You can avoid creating entities for special characters by using this method.

Syntax

  
HRESULT WriteRaw (WCHAR * pwszData);  

Arguments

pwszData
The data to write. Writes nothing if NULL.

Return Value

Returns S_OK if no error is generated.

Remarks

If pwszData is NULL, nothing is written. In contrast, if this parameter is an empty string, an empty text entry is written. That is, the value written is "".

The following example shows the use of WriteRaw:

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

For a more detailed example of the WriteRaw method, 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

IXmlWriterLite Methods