Share via


WriteRaw (Compact 2013)

3/26/2014

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

Syntax

HRESULT WriteRaw (
  const WCHAR* pwszData
);

Parameters

  • pwszData
    The data to write. Writes nothing if NULL.

Return Value

This method returns S_OK if no error is generated.

Remarks

If pwszData is NULL, nothing is written. If this parameter is an empty string, an empty text entry is written.

The following code shows using WriteRaw:

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

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

See Also

Reference

IXmlWriter Methods
IXmlWriter Properties