C # HTML Font Tag Parsing

I need to parse a large amount of text that uses HTML font tags for formatting,

For instance:

<font face="fontname" ...>Some text</font> 

In particular, I need to determine which characters will be displayed using each font used in the text. I need to be able to handle things like font tags inside another font tag.

I need to use C # for this. Is there some kind of C # parser class to make this easier? Or should I write this myself?

Thanks!

+4
source share
3 answers

I did not use it, but I saw the HTML Agility Pack , often mentioned for this type of thing.

+3
source

Not sure if this applies to your situation, since I don't know what the intended use is, but what about using tempaltes XSLT?

0
source

You can load HTML into Internet Explorer and then query the DOM for font tags (or CSS style).

I don’t know how optimal this is.

0
source

All Articles