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

Re: How to access attributes (not in header)

Expand Messages
  • Martin McFly
    If your client looked like this: $result = $soap- yourFunctionCall(...); And assuming that is in Array context, you can retrieve specific tags by
    Message 1 of 2 , Nov 13, 2002
    • 0 Attachment
      If your client looked like this:

      $result = $soap->yourFunctionCall(...);

      And assuming that <singer> is in Array context, you can retrieve
      specific tags by using:

      $result->[0]->{name}

      or

      $result->[1]->{title}


      --- In soaplite@y..., "slowloris272000" <noguken@h...> wrote:
      > Hi
      >
      > It must be a silly question. How can I match a element with
      > attributes?
      >
      > Say, SOAP server responded to my query, and these records
      > are in the response.
      >
      > <singer no="1">
      > <name>John Smith</name>
      > <title>CD 1</title>
      > <title>CD 2</title>
      > </singer>
      > <singer no="2">
      > <name>Kelly Lee</name>
      > <title>Tune 1</title>
      > <title>Tune 2</title>
      > </singer>
      >
      > How do I retrieve data (SOM subset) for singer no=2?
      > $som->valueof('//singaer@no=2')
      >
      > if I use paramsout and loop to do serial search,
      > it works but obviously it's slow and bad idea.
      >
      > How do I directly lookup a element which has a specific
      > attribute?
      >
      > thanks.
      > ken
    Your message has been successfully submitted and would be delivered to recipients shortly.