DOMParser in scripts?

I’m trying to parse XML pulled in from another API in scripts. I’ve tried using 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!

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.

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?

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).