A stack may help to invert and reconstruct the hash from recursive context - I will certainly see what I can do with that suggestion, thanks!

(Update: but I will want to avoid any walking around the stack - "where I am" is easy in the particular case because I have an instance variable for it. As a rule it is best to stick to pushing and popping.)

re XML::Twig, there were other requirments that needed to be met by various projects for my client, not just the size of the XML files and these were not met by XML::Parser or Expat. It was obvious fairly early on that I needed to be able to code features into the main part of the parser so I had to have control over it and new requirments since then have also deviated from what is currently availabkle in the XML namespace, such as tolerating extra characters between tags that do not conform to "standard" XML whatever that might be.

XML::Twig suffers from my point of view in that respect from being built on XML::Parser.

At some point I will have to make a list of the special features and think up a new name for the module. XML::Deviant perhaps ;)

-M

Free your mind


In reply to Re^2: Nesting below emptiness and/or inverting a hash. by Moron
in thread Nesting below emptiness and/or inverting a hash. by Moron

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.