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

Re: [soaplite] New User Question: nested SOAP::Data?

Expand Messages
  • Eric Bridger
    Nested XML can be produced by making use of references to SOAP::Data objects. Perhaps best illustrated by an example: $_ = SOAP::Data- name( smiles =
    Message 1 of 2 , Sep 19, 2007
    View Source
    • 0 Attachment
      Nested XML can be produced by making use of references to SOAP::Data
      objects. Perhaps best illustrated by an example:

      $_ = SOAP::Data->name( 'smiles' =>
      \SOAP::Data->name('string' => $val) )
      );

      To create an element with no type try:

      $_ = SOAP::Data->name( 'smiles' =>
      \SOAP::Data->name('string' => $val) )->type('')
      );

      if I remember correctly.

      Eric

      On Sep 19, 2007, at 4:10 AM, leegee23 wrote:

      > I'm having a few problems getting to grips with some software I've
      > inherited that uses SOAP::Lite.
      >
      > A line reads
      >
      > $_ = SOAP::Data->name('smiles' => $val );
      >
      > and seems to output
      >
      > <smiles xsi:type="xsd:string">data</smiles>
      >
      > Problem is that I need that inner text node to be wrapped in a
      > further XML node, 'string':
      >
      > <smiles xsi:type="xsd:string"><string>data</string></smiles>
      >
      > Please would some kind soul point me in the right direction? I'm
      > finding the verbosity of the documentation rather confusing.
      >
      > Many thanks in anticipation
      > Lee
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.