Just a point for the sake of providing a background to my question.

While I totally agree with your idea of fixing the problems at the source instead of patching the result at the end, I still need some fixing code. Because I am replacing locally (with some others) the outsourced team that did a very bad design and code, and that code produced for several years a big amount of (broken-but-visually-looking-ok) html files. While a DB is involved at some point, they choose to keep in a filesystem the data presented in the html files for history instead of the source data. The producing code is being fixed, but we still need to access the data (to separate the data and the way it is displayed).

And BTW, I have nothing against Indians in themselves -they seem to have some skilled people in the academic field-, but the sad point is that the company made a deal with a big indian body seller that provided junior skilled guys billed as seniors...

The best programs are the ones written when the programmer is supposed to be working on something else. - Melinda Varian

In reply to Re^2: Parsing incorrect html by seki
in thread Parsing incorrect html by seki

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.