Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

You are getting a bad response because your questions are not clear and do not show any actual attempt to solve the problem.

You will get a better result if you clearly state what your goal is, show a sample of failed code, and describe the error/bad result from your attempt. Read the How (Not) to Ask a Question node linked elsewhere in the thread.

For example, if you had said, "I need to iterate over the array reference stored in the 'Fruits' key and find all cases where the grandchild key is 'Orange'. Here's what I've tried: ... some code goes here...", you would probably have an answer by now.

Your questions make giving you the answer you want impossible. Nobody really knows what you really want. Someone might hit on it in with a lucky guess, but do you want to rely on an improbable chance?

Here's where I take a guess at helping you. Your variable name is '$xml'. Are you getting this data structure from an XML file? It's a needlessly complex structure. What tools are you using to parse the XML? Maybe a different library would be helpful. There are tons of libraries for XML munging that may make solving your problem trivial. If the data doesn't come from an XML file, you may wish to change your variable name, and simplify the data structure.

Update: Take a look at Iterating over an array variable times for an example of an unclear question followed up by a good problem statement.

TGI says moo

In reply to Re: Foreach hash of array by TGI
in thread Foreach hash of array by rose

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (8)
    As of 2019-02-18 18:18 GMT
    Find Nodes?
      Voting Booth?
      I use postfix dereferencing ...

      Results (100 votes). Check out past polls.