xml.valToString

Syntax xml.valToString (val, indentLevel)

Params val is a scalar Frontier value, a string, a date, a number, double-precision floating point number or a boolean.

indentLevel is a number, that appears to have no purpose. Its default value is 0.

Action Convert the Frontier representation of the value into an XML representation of the value.

Returns The XML representation of the value.

Examples xml.valToString ("hello world") //strings don't need tags
"hello world"

xml.valToString (date ("1/1/2000"))
"<dateTime.iso8601>20000101T00:00:0</dateTime.iso8601>"

xml.valToString (-12)
"<i4>-12</i4>"

xml.valToString (-12.01)
"<double>-12.01</double>"

xml.valToString (true)
"<boolean>1</boolean>"

try {xml.valToString (@scratchpad)} else {tryError}
"Can't process the request because a Frontier value of type "address" can't be represented in XML-Data at this time."

Notes This is the routine that Frontier calls to serialize a Frontier scalar when making an XML-RPC call.

See Also xml.decompile

betty.rpc.client

XML-RPC