title: How can I extract a CDATA value from the structure created by XML::Simple?
body: <p>I use a Perl script with the module <a href="http://search.cpan.org/dist/XML-Simple" rel="nofollow noreferrer">XML:Simple</a> to parse an XML feed:</p>
  
  <pre><code>my $xml=XMLin($resp-&gt;content);
  my $xml2 = $xml-&gt;{params}{param}{value}{array}{data}{value}{struct}{member};
  
  
  print $xml2-&gt;{prod_id}{value}{int}; #works fine
  
  print $xml2-&gt;{product_text}{value}{string}; #returns a hash reference (hash(0x...)
  </code></pre>
  
  <p>What have I to modify to get the text:</p>
  
  <pre><code>&lt;div class="text"&gt; &lt;div class="text_products"&gt;sdfsdf&lt;/div&gt; &lt;/div&gt;
  </code></pre>
  
  <p>instead of a hash reference?</p>
  
  <p>This is the XML data:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
  - &lt;methodResponse&gt;
  - &lt;params&gt;
  - &lt;param&gt;
  - &lt;value&gt;
  - &lt;array&gt;
  - &lt;data&gt;
  - &lt;value&gt;
  - &lt;struct&gt;
  - &lt;member&gt;
    &lt;name&gt;product_text&lt;/name&gt; 
  - &lt;value&gt;
    &lt;string&gt;&lt;![CDATA[ &lt;div class="text"&gt; &lt;div class="text_products"&gt;sdfsdf&lt;/div&gt; &lt;/div&gt; ]]&gt;&lt;/string&gt; 
    &lt;/value&gt;
    &lt;/member&gt;
  - &lt;member&gt;
    &lt;name&gt;prod_id&lt;/name&gt; 
  - &lt;value&gt;
    &lt;int&gt;1290&lt;/int&gt; 
    &lt;/value&gt;
    &lt;/member&gt;
  - &lt;member&gt;.......
  </code></pre>