This project has moved and is read-only. For the latest updates, please go here.
1
Vote

HtmlDocument output cannot be parsed as XML because of " -- " in a comment

description

Hi,

I found an issue where I'm trying to parse an HTML document and load it to XElement.
This specific HTML had a comment at the header that was going like this:
<!-- Comment comment comment -- --> As you can see, there is a "--" that is not related to the ending comment clause. It makes the XML file unparsable.
Now I'm not really sure what is the correct approach to resolve it but as far as I can imagine (as a developer) when I set the OptionOutputAsXml I get the feeling that I will be able to load it as XML (as documented).

As a workaround I resolved it by removing all of the comments.

BTW: I love this project. Please keep doing the amazing work you are doing! :-)

Thanks,
Lidan Hackmon

comments