Well, about what the program does.. hmm, I really hoped that showing the input, saying that the program parses it and showing the output would say much more then I'd be able to say in words :)

So: I want to be able to extract links from HTML _and_ associate them with a reasonable link_text, even if the links are nested and the text that should pertain to a given link is interspersed with possible various other tags, even if the links are nested.

In order to do so, I wanted to explore the modules that would allow this sort of operation as easiest as possible - in order to get a good start the next time I'd have to do something similar, so that I'd know better the strenghts and weaknesses of the available tools.

HTML::Parser would be Way#1; having the same problem solved with alongside Way#2 (HTML::LinkExtractor), Way#3 (HTML::TokeParser), etc. would allow to get an easy overview/comparison on the available tools/modules.


In reply to Re^2: Parsing HTML - once again by Krambambuli
in thread Parsing HTML - once again by Krambambuli

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.