Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

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, 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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (1)
    As of 2018-07-22 01:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















      Results (451 votes). Check out past polls.

      Notices?