to_xml()

Scalar. Converts a given value to XML.

Syntax

to_xml ( value )

Parameters

value

A string, or an XML type object.

Usage

Converts a given value to XML. The function takes a string as its argument, and the function returns a string. The function can also take an XML type object as its argument, but it will return the same object. The function is the same as xmlparse(), but it can also handle an XML input.

Example

xmlserialize ( to_xml ('<t/>') ) returns '<t/>'. The string gets converted to XML, then back into a string.