Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Converts an object or JSON string to XML.  

Syntax

toXML(input, root)

ArgumentTypeDescription
input

Object

JSON String

The object or JSON string to be converted to XML.
rootStringThe name given to the root element.

Example

Code Block
titleInput
toXML(getCo, "CompaniesData")

Returns the XML:

Code Block
<CompaniesData><CompaniesData><CompanyID>102</CompanyID><CompanyName>Lockman, Barrows and Kessler</CompanyName><Industry>Telecoms</Industry></CompaniesData><CompaniesData><CompanyID>103</CompanyID><CompanyName>Boyle, Bogan and Mohr</CompanyName><Industry>Telecoms</Industry></CompaniesData><CompaniesData><CompanyID>104</CompanyID><CompanyName>Kassulke LLC</CompanyName><Industry>Telecoms</Industry></CompaniesData></CompaniesData>

...