I recently started experimenting with HtmlAgilityPack. I am not familiar with all of its options, and I think that I am doing something wrong.
I have a line with the following contents:
string s = "<span style=\"color: #0000FF;\"><</span>";
You see that in my gap I have a lesser sign. I process this line with the following code:
HtmlDocument htmlDocument = new HtmlDocument(); htmlDocument.LoadHtml(s);
But when I make a quick and dirty look in between, like this:
htmlDocument.DocumentNode.ChildNodes[0].InnerHtml
I see that the blank is empty.
Which parameter do I need to set, save the less sign. I have already tried this:
htmlDocument.OptionAutoCloseOnEnd = false; htmlDocument.OptionCheckSyntax = false; htmlDocument.OptionFixNestedTags = false;
but without success.
I know this is invalid HTML. I use this to fix invalid HTML and use HTMLEncode on less than characters
Please guide me in the right direction. thanks in advance
html c # html-agility-pack
Turbas
source share