I apologize, but instead of an answer, I will offer you a semi-rant on how to ask a question so it's easy for me (and any one else!) to answer. Don't take it baddly, I just hope this will help you get an answer for this question... and the next ones.

For me to answer, your question should be as close to a test as possible: an example of your (non-working) code, with data (I like it in a DATA section, so I can just cut'n paste the whole thing and have it all in a single file), and the results you expect. If you write it as a real test, using Test or Test::More, that's even better.

As it is your XML is really long and not well-formed, and I quickly gave up on trying to get the closing tags right. Plus it is a bit difficult for me to figure out exactly what result you want.

If you post something that I can run, fix and post back, you have a much better chance to get a usefull answer.


In reply to Re: XML::Twig usage incomprehension by mirod
in thread XML::Twig usage incomprehension by Jerome

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.