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

Re: [soaplite] SOAP::Lite Parsing question

Expand Messages
  • Steve Benzo
    The XML I m working with is correct, I must have just mis-copied. Anyway, here s a snippet of the XML I m having trouble parsing. Again, I m trying to get
    Message 1 of 3 , Oct 11, 2006
    • 0 Attachment

      The XML I'm working with is correct, I must have just mis-copied. Anyway, here's a snippet of the XML I'm having trouble parsing.
      Again, I'm trying to get access to the each of the networkAdmin nodes (see below) while parsing the individual networks. The way I've been trying to do this heretofore is:

       for my $t ($som->valueof('//networks/network')) {
          print $t->attr->{ID} . "\n";
       #now print each of the user admins
        #doesn't work###f or my $tt($som->valueof('networkAdmin')) {
        #doesn't work### print $tt->attr{status} . "\n";
      }

      Here's the *correct* XML:

      <
      networks>
      - <network ID="1600012" name="node2">
      -  <metadata>
        <location>ireland</location>
        <date_established>2006-06-28</date_established>
        </metadata>
        <networkAdmin UID="1" name="X" techCert="C1" status="1" />
        <networkAdmin UID="2" name="XX" techCert="D1" status="1" />
        </network>
      - <network ID="1611400" name="nodeX">
      - <metadata>
        <location>utah</location>
        <date_established>1954-11-24</date_established>
        </metadata>
        <networkAdmin UID="1" name="AB" techCert="A1" status="1" />
        <networkAdmin UID="2" name="AC" techCert="E1" status="1" />
        <networkAdmin UID="3" name="AC" techCert="E1" status="1" />
        </network>
      </networks>


      Sebastian Jaenicke <sjaenick+SOAPLITE@...-Bielefeld.DE> wrote:
      Hi,

      doesn't actually look like valid XML to me.

      On Wed, Oct 11, 2006 at 08:17:46AM -0700, Steve Benzo wrote:
      [..]
      > XML below:
      >
      > <networks>
      > <network ID="1600012" name="node2" >
      >
      > <location>ireland< /location>
      > <date_established> 2006-06-28< /date_establishe d>
      > </metadata>
      ^^^^^^^^^^^

      > <networkAdmin UID="1" name="X" techCert="C1" status="1"/>
      > <networkAdmin UID="2" name="XX" techCert="D1" status="1"/>
      > </network>
      > <network ID="1611400" name="nodeX" >
      >
      > <location>utah< /location>
      > <date_established> 1954-11-24< /date_establishe d>
      > </metadata>
      ^^^^^^^^^^^

      No opening '<metadata>' tags at all?

      > <networkAdmin UID="1" name="AB" techCert="A1" status="1"/>
      > <networkAdmin UID="2" name="AC" techCert="E1" status="1"/>
      > <networkAdmin UID="3" name="AC" techCert="E1" status="1"/>
      > </network>

      Missing '</networks> ' here.

      - Sebastian
      --
      Progress (n.): The process through which Usenet has evolved from
      smart people in front of dumb terminals to dumb people in front
      of smart terminals.
      -- obs@burnout. demon.co. uk


      All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

    Your message has been successfully submitted and would be delivered to recipients shortly.