title: Help with XML, PHP and CDATA
body: <p>I have the following contents in my XML file:</p>
  
  <pre><code>&lt;items&gt;
  &lt;item id="1"&gt;&lt;content&gt;&lt;![CDATA[&lt;p&gt;string&lt;/p&gt;]]&gt;&lt;/content&gt;&lt;/item&gt;
  &lt;/items&gt;
  </code></pre>
  
  <p>I have HTML inside the content, so, I used CDATA. However, when I'm trying to display the content as HTML on the web page:</p>
  
  <pre><code>$item_content = $xpath2-&gt;query("/bulletin/item[@id='$item_id']/content");
  foreach ($item_content as $i)
  {
      $a = $dom-&gt;createElement('div');
      $a-&gt;appendChild($dom-&gt;createCDATASection($i-&gt;nodeValue));
      // $child = $dom-&gt;createElement('div',$i-&gt;nodeValue); &lt;--this fails miserably
      $content_tag-&gt;appendChild($a);
  }
  </code></pre>
  
  <p>It will get displayed as:</p>
  
  <p>&amp;lt ;p&amp;gt ;string&amp;lt ;/p&amp;gt ;</p>
  
  <p>How do I display it as HTML?</p>