Sep 22, 2020 09:07 PM
I’m trying to parse XML pulled in from another API in scripts. I’ve tried using https://gist.github.com/petersirka/9e79b1d43cf6e579fc62 but it is insufficient as the parsing is not accurate in some cases.
Is there a way we can use DOMParser() to parse XML?
Thank you!
Sep 23, 2020 08:04 AM
Hi @Duong_Nguyen and welcome to the community!
It depends (I think) on whether you are running in a Script Block, a Script Action (calling a script block), or a Custom Block (also known as an “App”). The latter (and only the latter), I believe is able to use the entire contingent of javascript parsing possibilities.
Sep 23, 2020 08:17 AM
Hi @Bill.French, thanks for replying! I’m thinking about the Scripts app from the right sidebar (after clicking ‘Apps’, and then install an app).
Is it possible to use DOMParser in there?
Sep 23, 2020 08:32 AM
I believe anything you want to do that can be done in Javascript/React is at your disposal. This would be a “custom block” (app).