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

parsing complex return values

Expand Messages
  • Orlando Andico
    the cyberthink computer dictionary returns a rather complex value (an XML document of a sort):
    Message 1 of 1 , Jul 23, 2003
      the cyberthink "computer dictionary" returns a rather complex value
      (an XML document of a sort):

      <?xml version="1.0" encoding="utf-8"?><soap:Envelope
      SP="False">/nan'-oh-tek-no"l*-jee/ A hypothetical fabrication
      technology in which objects are designed and built with the individual
      specification and placement of each separate atom. The first
      unequivocal nanofabrication experiments took place in 1990, for
      example with the deposition of individual xenon atoms on a nickel
      substrate to spell the logo of a certain very large computer company.
      Nanotechnology has been a hot topic in the hacker subculture ever
      since the term was coined by K. Eric Drexler in his book "Engines of
      Creation", where he predicted that nanotechnology could give rise to
      replicating assemblers, permitting an exponential growth of
      productivity and personal wealth.</Para><Para SP="False">See also
      SP="False">(1996-01-10)</Para></DESC><CATEGORIES /><RTerms><RTerm
      Type="T" Value="">nanobot</RTerm><RTerm Type="U"

      SOAP::Lite parses this into an equally-complex data structure:

      $VAR1 = {
      'RESULT' => {
      'TERM' => {
      'DESC' => {
      'Para' => '(1996-01-10)'
      'RTerms' => {
      'RTerm' => ''
      'TName' => 'nanotechnology',
      'CATEGORIES' => '',
      'TPresentation' => 'nanotechnology'

      what's an easy way to parse this? I tried
      my %para = $result->{RESULT}->{TERM}->{DESC}->{Para};

      but it doesn't quite work the way i expected.. (my knowledge of
      complex Perl data structures is nonexistent..)
    Your message has been successfully submitted and would be delivered to recipients shortly.