1

I'm looking for a HTML and JavaScript parser in .NET.

After reading some posts it seems HTML Agility Pack is the best HTML parser approach but it lacks in documentation. I've found some examples of data extraction but almost none of data transformation.

Where can I find useful samples of data manipulation with HTML Agility Pack and what's the best choice of a JavaScript parser?

casperOne
  • 73,706
  • 19
  • 184
  • 253
Diogo Cardoso
  • 21,637
  • 26
  • 100
  • 138
  • 1
    What do you mean by a "JavaScript" _parser?_ Are you trying to check the syntactic validity of your JS code, or actually execute it server-side? And yes, the HTML Agility Pack is [the answer](http://stackoverflow.com/questions/100358/). – Matt Ball Mar 15 '11 at 16:12

2 Answers2

2

Perhaps you 're looking for something like this: http://jint.codeplex.com/ Alternative, I suggest you take a look at Microsoft.JScript: http://msdn.microsoft.com/en-us/library/72bd815a(v=vs.80).aspx

Ioannis Karadimas
  • 7,746
  • 3
  • 35
  • 45
2

I would vote for the HTML Agility Pack. In my experience it doesn't need my documentation if you're familiar with System.Xml.XmlDocument -- it has a very similar API.

Sorry but I can't comment on a JS parser. Perhaps if you explained more about why you want to parse JS I could be of more help.

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742