Currently I am working on javascript code in order to request an external API of my network.
The response of the API is in JSON format and my code convert it in XML format. The request and the conversion of data works well.
Unfortunately when I want to use the output xml file for the purpose of insert data in an application I have an error with a "SOH" character. It is the only one character type that I have a problem with.
Within this application I can only use 4 libraries because the code is executed in a sandboxed environment. The allowed libraries are "request", "xpath", "xmldom" and "xml2js" and I am obliged to use xml 1.0 because I had seen that in version 1.1 of xml the SOH character was handled.
Someone know how to escape or replace this character in my xml output?
If you need further informations let me know.
Thanks in advance!
Below an example of my error:
<upper_xmlTag>...
<xmlTag>my_string SOH (the character appears in the middle of the sentence.) end_of_string</xmlTag>
<bottom_xmlTag>...