I don't remember :) I guess it seems obvious its a function you're supposed to write yourself -- so yeah, what you said is pretty much spot on ,

No worries - we appear to be on the same page as far as that goes.

except the appear that's poorly documented portion, because that seems like pretty good documentation to me

Just to clarify, "It would appear that's poorly documented" (by me) only referred to the sample code under parse_chunk and was in response to the OP's "I copied the 'example' straight out of CPAN ...". The function read_chunk_of_data() appears amidst two other functions, parse_chunk() and last_chunk(), with no clear distinction between those last two being provided by the module and the first not being so provided. [read_chunk_of_data() also appears under filter_chunk in much the same context.]

Overall, I personally have no problem with the documentation. The example code I wrote in my original response was purely from the documentation and only took a minute or two despite never having used XML::Rules.

-- Ken


In reply to Re^5: XML parsing with XML::Rules by kcott
in thread XML parsing with XML::Rules by mcoblentz

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.