Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

DOMParser in scripts?

Topic Labels: Scripting extentions
2764 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Duong_Nguyen
4 - Data Explorer
4 - Data Explorer

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!

3 Replies 3

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.

Duong_Nguyen
4 - Data Explorer
4 - Data Explorer

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