What advantages are there for using either XSLT or Linq to XML for HTML parsing in C#? This is under the assumption that the html has been cleaned so it is valid xhtml. These values will eventually go into a c# object to be validated and processed.

Please let me know if these are valid and if there are other things to consider.

XSLT Advantages:

  • Easy to change quickly and deploy
  • Fairly well known

XSLT Disadvantages:

  • Not compiled, so is slower to process
  • String manipulation can be cumbersome
  • Will more challenging to get into the C# object at the end

Linq to XML Advantages:

  • Compiled, so it runs faster
  • Allows for better string manipulation

Linq to XML Disadvantages:

  • Must be compiled for update

Edit: I should clarify, I want these to run long term an the website may update their layout once a while. That was one of the bigger reason I thought I would use something that didn't require compiling.

Edit
Report