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

842A continuation of the passing XML as string discussion..

Expand Messages
  • Jean-Jack M. Riethoven
    Sep 20, 2001
    • 0 Attachment
      Greetings,

      I have read the discussion on passing XML in strings with great interest.
      We are doing the same with our server, sending a blob of XML over the wire.

      This would all work perfectly if everyone has XML::Parser. When falling
      back on XML::Parser::Lite the %lt; are obviously not encoded back properly
      yet (see docs).

      I have been looking at the other methods that were suggested:

      1. return SOAP::Data->type(xml => $xmlblob)

      2. the use of <![CDATA[..]]>

      When trying to do 1. (my preferred method), I get warnings from the parser:

      xml processing instruction not at start of external entity at line 1,
      column 426, byte 426 at
      /sw/common/share/perl/site-perl/5.00503/alpha-osf1/XML/Parser.pm line 185

      Bascially, my $xmlblob is a fully valid and well-formed piece of xml,
      including the <?xml ?> start. Removing the first line warns about another
      processing instruction <?format DECIMAL=".">, removing that one warns about
      the <!DOCTYPE..> stuff.
      The Doctype stuff is required for the validation at the other side.


      The instructions on 2 were not completely clear to me, but I tried several
      forms at the server side:

      return "<![CDATA[" . $xmlblob . "]]>"
      return SOAP::Data->type(xml => ("<![CDATA[" . $xmlblob . "]]>")) (or with
      string as type)

      etc.. These didn't seem to work as well (still < and <![CDATA tags still
      in output.


      I am hoping to do everything server-side so I don't have to do anything
      manual at the client side - does anyone have a cookbook example how to use
      an xml blob (including PI's) without the need for decoding (in the event of
      absence of the XML::Parser module) ?

      With kind regards,

      --
      drs. Jean-Jack M. Riethoven

      EMBL Outstation - Hinxton pow@... ICQ#: 3433929
      European Bioinformatics Institute Phone: (+44) 1223 494635
      Wellcome Trust Genome Campus Fax : (+44) 1223 494468
      Hinxton, Cambridge CB10 1SD URL : http://industry.ebi.ac.uk/
      UNITED KINGDOM

      Need to find bioinformatics or molecular biology web sites or resources?
      Use BioWurld at http://www.ebi.ac.uk/biowurld
    • Show all 7 messages in this topic