JsonToXml
Converts a JSON string to XML.
Syntax
JsonToXml(<string>[, <xml_format>[, <as_xml_dom>]]) As Variant
Parameters
<string>
Type: String
The JSON string to be converted to XML.
<xml_format>
Type: Long
Optional. Controls the form of the XML generated:
0: Generic XML. The XML document element is named “Root”. JSON objects are converted to XML elements. JSON properties are converted to XML attributes.
1: Player XML. This produces XML that is compatible with the Player XML format. The XML document root is named “Page”. In general, JSON objects are converted to XML elements and JSON properties to XML attribute. The following properties are converted to XML text nodes instead of XML attributes: the “Text” properties of the “Label” and “Title” objects and the “Value” property of the “Response” object. Boolean JSON properties are converted to lowercase “true” and “false” XML attributes.
Default value: 0
<as_xml_dom>
Type: Bool
Optional.
True: Returns an MSXML DOM document.
False: Returns an XML string.
Default value: False.
(return)
Type: Variant
The JSON converted to XML. The type depends on the value of XmlFormat.
See also