...
Converts an object or JSON string to XML.
Syntax
toXML(input, root)
Argument | Type | Description |
---|---|---|
input | Object JSON String | The object or JSON string to be converted to XML. |
root | String | The name given to the root element. |
Example
Code Block | ||
---|---|---|
| ||
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> |
...