...
Code Block | ||
---|---|---|
| ||
[string] asJSON([string] xml) // convert aan xml string to json string |
...
Code Block | ||
---|---|---|
| ||
var myXml=http.get("https://www.w3schools.com/XML/note.xml"); var myJson=JSON.parse(xml.asJSON(myXml)); var from=myJson.note.from; var to=myJson.note.to; out.table(["from","to"],[[from,to]]); |
Output:
from | to |
---|---|
Jani | Tove |