Share via


WriteEntityRef (Compact 2013)

3/26/2014

This method 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

This method 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:

&name;

This method returns an error if NULL is supplied for the name. The following code shows the use of WriteEntityRef:

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

See Also

Reference

IXmlWriter Methods
IXmlWriter Properties