Does anyone have a recommendation on good lightwei...
# suitescript
s
Does anyone have a recommendation on good lightweight library for converting some very simple JS objects to XML, and back again? I am integrating a script with a service that uses XML for input and output: request from:
Copy code
{
  id: "50001"
  first: "Martin",
  last: "Hayes",
  address: {
    street: "123 Main St",
	city: "Anytown"
  }
}
to:
Copy code
<request>
  <first>Martin</first>
  <last>Hayes</last>
  <address>
    <street>123 Main St</street>
    <city>Anytown</city>
  </address>
</request>
response from:
Copy code
<response>
  <id>50001</id>
  <status>SUCCESS</status>
</response>
to:
Copy code
{
  id: "50001",
  status: "SUCCESS"
}