in reply to Re: look_up() in HTML::Element Not Traversing As Expected
in thread look_up() in HTML::Element Not Traversing As Expected

I want URL2, does that change anything? How can you tell where a branch ends and when a branch begins? I traversed the entire code to get all URL elements, so at one point there were all accessable to me using look_down().
  • Comment on Re^2: look_up() in HTML::Element Not Traversing As Expected

Replies are listed 'Best First'.
Re^3: look_up() in HTML::Element Not Traversing As Expected
by GrandFather (Saint) on Apr 29, 2006 at 04:07 UTC

    Nope. URL2 is still "up a few, over a couple, down a couple and over a couple". It's a sibling of URL1. Originally it was in a span element, but fo illustration purposes that doesn't matter.

    I hope you see, BTW, the virtue of cleaning up the sample data to the point where we are talking about only the relevant structure and simple data? You ought do this sort of thing pretty much whenever you have a problem to solve - remove the cruft and concentrate on the real problem.

    The real problem here is that the connection between the data you are matching and the data you want is rather tenuous so you have to make sure you understand exactly what that relationship is before you can write code to implement it. Here I think it is usefull to think in terms of parent/child and sibling relationships here.


    DWIM is Perl's answer to Gödel