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

2639Re: [soaplite] How to send and raw XML.

Expand Messages
  • Jim Cromie
    May 20, 2003
      I think that should be:
      $xml_content =~ s/<\?xml.*?\?>\n?//; # strip the <?xml blah?>
      $xml_content =~ s/<!.*?>\n?//;      # strip

      .*? is non-greedy - if youre operating on a whole-file buffer this could
      be important, but testing would tell you that youve deleted large chunks of your content.
      <>! are not special inside a regex, and dont need escaped.

      Byrne Reese <breese@...> wrote:
      To package raw XML in a SOAP::Data element, simply:

              my $xml_content = fetch($url);
              $xml_content =~ s/\<\?xml.*\?\>\n?//; # strip the <?xml blah?>
              $xml_content =~ s/\<\!.*\>\n?//;      # strip
              return SOAP::Data->type('xml' => $xml_content);

      Do you Yahoo!?
      The New Yahoo! Search - Faster. Easier. Bingo.

    • Show all 3 messages in this topic