How to keep case of attribute name without lower case in html flexibility package

I want to keep case of attribute name without lower case

when i load the xml into the attribute name of the HTMLAgility package is changed to lowercase like this

<Author affiliationids="Aff1" correspondingaffiliationid="Aff1"> I want this conclusion to be

<Author affiliationids="Aff1" correspondingaffiliationid="Aff1">

+4
source share
2 answers

You cannot do this unless you change the source (the Html Agility Pack is open source, so you are free to go). it's design because it was designed to handle HTML, and HTML is not case sensitive.

+1
source

Now it is officially fixed and promised to be included in the next release

Now you can download the source and create it yourself.

To prevent the use of lowercase all attributes:

 HtmlDocument document = new HtmlAgilityPack.HtmlDocument(); document.OptionOutputOriginalCase = true; 
+10
source

All Articles