views:

264

answers:

1

Is there any option in the html agility pack that can parse the tag which is like in the &lt and &gt.

If there is tag like <table> then html agility pack parse the information from the tag table properly.But if the tag is like &lt table &lt then it does not parse the information from the tag table here. So any option is there in the html agility pack that parse information from such tags also.

A: 

No there isn't an option to this as far as I know but you should be able to use Server.HtmlEncode() to turn these characters into real brackets.

Where is your code coming from, a file on your server or retrieved via a url? I'm just asking because I dont think you would be able to use the HtmlWeb class to retrieve the html because it turns it into a HtmlDocument before you can get your hands on it.

Instead you would have to use the .net library class HttpWebRequest to retrieve the html and then load it directly in to a HtmlDocument with HtmlDocument.Load();

I have written an article which shows how to load a string into a HtmlDocument here:

rtpHarry