Greetings monks.

Currently I'm writing a POE script that parses certains sets of input upon request. Input is, thankfully, easy to parse XML. However the problem I'm running into is is that some of the data in the XML file contains what we could call 'See Also' records, in which they point to additional files which need to be fetched and parsed, which also may contain 'See Also' records, and so on and so forth.

Now with a non-POE script I'd just keep a count of how many 'See Also' doc's parsed, and keep fetching/parsing until it reaches 0, but with POE's event driven nature I'm confused as how store the temporary data and how to know when I've reached the 'bottom' so I know it's safe to start doing the actual processing of the XML.

Any ideas and suggestions would be greatly appreciated.

See this node for an accurate description of what I'm trying to accomplish

In reply to POE and recursion by OverlordQ

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.