%XML_DOC_TOSTRING

Write contents of an XML document to an XML string

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xml_string = %XML_DOC_TOSTRING(document[, format])

Return value

xml_string

The XML string that contains the serialized XML document. (XML_STRING_TYPE)

Arguments

document

The XML document instance to serialize. (XML_DOC_TYPE)

format

(optional) If this argument is passed, the XML string is formatted with a line feed (LF) between the lines. (n)

Discussion

%XML_DOC_TOSTRING creates and returns an XML string that contains an entire XML document. You can then retrieve the Synergy memory handle for that string using %XML_STRING_GETHANDLE.

You can alternatively serialize an XML document into an XML file using %XML_DOC_TOFILE.

Strings created with %XML_DOC_TOSTRING should be deleted using %XML_STRING_DELETE when you’re done with them.

Note

When serializing an XML document to a string, %XML_DOC_TOSTRING will not unescape any escaped text or attribute values in the XML document even if %XML_OPTION is set to SYNESCAPE_UNESCAPE.

This function is defined as ^VAL.

Examples

See XML_to_Synergy_DBMS, available from Synergy CodeExchange in the Synergex Resource Center.