Parse html on server side?

dmfranko
Kilo Guru

Hello,

I'm looking for a way to parse html on the server side.   Client side I can use DOMParser, but I'm not sure what my options are if any server-side?

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

What exactly are you trying to parse? You do have some options if this is XML:



XMLHelper - ServiceNow Wiki


XMLDocument Script Object - ServiceNow Wiki


Hey Brad,



I'm actually trying to parse html.   I'm playing around with the possibility of pulling the html from kb articles, getting all of the links in said article and then checking to make sure they are valid.



Thanks!


Dan


Hi Dan,



Even I want to get width of the image tags from the HTML field.Did u find the solution for it?


Could you please help me with the code?



Thanks


Sreeja


I actually didn't end up doing this, but I still think it's a good idea.   I think the XML helper might do the trick, but there are some other options.   I'll probably revisit this soon and I'll post back here with what I come up with.