WriteEntityRef (IXmlWriterLite)
Writes out an entity reference with the specified name.
Syntax
HRESULT WriteEntityRef (const WCHAR * pwszName);
Arguments
pwszName
The name of the entity reference. NULL is not valid.
Return Value
Returns S_OK if no error is generated.
Remarks
This method produces an entity reference in the following format, where name is the name provided in pwszName
:
&name
This method returns an error if pwszName
is NULL.
The following example shows the use of WriteEntityRef
:
if (FAILED(hr = pWriter->WriteEntityRef(L"myEntity")))
{
wprintf(L"Error, Method: WriteEntityRef, error is %08.8lx", hr);
return -1;
}
For an example of WriteEntityRef
, see Write an XML Document using XmlLite.
Requirements
Header: XmlLite.h
Library: XmlLite.lib