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

3046Re: SOAP::SOM array of arrays

Expand Messages
  • teden
    Oct 8, 2003
    • 0 Attachment
      --- In soaplite@yahoogroups.com, "Thom Eden" <the@d...> wrote:
      > Folks,
      >
      > I am having an issue parsing a SOAP::SOM envelope. Basically, I
      have an array of arrays, e.g.
      >
      > <A>
      > <B>q</B>
      > <B>r</B>
      > </A>
      > <A>
      > <B>x</B>
      > <B>y</B>
      > </A>
      >
      > The code I am using looks something like this:
      >
      > if ($som->match(SOAP::SOM::envelope)) {
      > foreach my $A_Element($som->dataof('//A')) {
      > print "<A>\n";
      > foreach my $B_Element($som->dataof('//A/B')) {
      > print " <B>".$B_Element->value."</B>\n";
      > }
      > print "</A>\n";
      > }
      > } else {
      > print "! It's not SOAP::SOM !\n\n";
      > }
      >
      > which should print out the above, but instead I get
      >
      > <A>
      > <B>q</B>
      > <B>r</B>
      > <B>x</B>
      > <B>y</B>
      > </A>
      > <A>
      > <B>q</B>
      > <B>r</B>
      > <B>x</B>
      > <B>y</B>
      > </A>
      >
      > I need the inner loop to position itself relative to the parent
      element. How do you do this?
      >
      > Many thanks,
      >
      > Thom Eden
    • Show all 6 messages in this topic