Loading ...
Sorry, an error occurred while loading the content.

1376processing complex som

Expand Messages
  • Doug Fulton
    Mar 29 12:59 PM
    • 0 Attachment
      My resuls structure has increased in complexity and I am having
      difficulty processing it. I have something like the following:

      <jobs>
      <job>
      <jobID> 1 </jobID>
      <jobItems>
      <jobItem>a<jobItem>
      <jobItem>b<jobItem>
      ...
      </jobItems>
      <job>
      ...
      <jobs>

      I tried:

      my @jobs = $som->valueof('//jobs');
      foreach $job (@jobs) {

      print $job->{'jobID'}."\n";

      print $_->{'jobItem'}
      for $job->{'jobItems'};
      }

      I get all the jobs (jobIDs), but I only get one jobItem per job --the
      last one, I believe.

      Thoughts on this?

      Thanks in advance,
      Doug
    • Show all 4 messages in this topic