Is there anyway to achieve the following with less complexity?
I have some HTML that i need to rebuild. The problem is the HtmlParser currently being used is incapable of handling nested tags with horizontal alignment set differently. So for instance, If i have a DIV align=center and within it a DIV align=right, the parser will basically treat the entire block as centered (the align=right was dropped).
How do i go about parsing the following to go from:
TO
TestRight
TestCenter2
2007-06-04
05:31:38
·
3 answers
·
asked by
zerohourx
1
in
Computers & Internet
➔ Programming & Design
The provided HTML is only a simplified example. In production this can be many layers deep.
2007-06-04
05:32:51 ·
update #1
Unfortunately i still need to pass in the HTML into the parsing engine, but so that i can have it output correctly i need to modify the original HTML string before passing to the parser in such a way to remove nesting but somehow retain the formatting. Thats what iw as trying to achieve above. I just need some C# (or other) code to achieve it.
2007-06-04
05:35:36 ·
update #2
Added more details to CodePrject: http://www.codeproject.com/script/comments/forums.asp?forumid=1649&select=2066175&df=100&msg=2066175
2007-06-04
06:09:48 ·
update #3