Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WriteRaw

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


HRESULT WriteRaw (WCHAR * pwszData);

pwszData

The data to write. Writes nothing if NULL.

Returns S_OK if no error is generated.

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 code 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 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:
© 2015 Microsoft