title: Parsing XML in PHP DOM via cURL - can't get nodeValue if it is url address or date
body: <p>I have this strange problem parsing XML document in PHP loaded via cURL. I cannot get nodeValue containing URL address (I'm trying to implement simple RSS reader into my CMS). Strange thing is that it works for every node except that containing url addresses and date ( and ).</p>
  
  <p>Here is the code (I know it is a stupid solution, but I'm kinda newbie in working with DOM and parsing XML documents).</p>
  
  <pre class="lang-php prettyprint-override"><code>function file_get_contents_curl($url) {
  
  $ch = curl_init();    // initialize curl handle
  curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable
  curl_setopt($ch, CURLOPT_TIMEOUT, 4); // times out after 4s
  $result = curl_exec($ch); // run the whole process
  
  return $result;
  }
  
  function vypis($adresa) {
  
  $html = file_get_contents_curl($adresa);
  
  $doc = new DOMDocument();
  @$doc-&gt;loadHTML($html);
  
  $nodes = $doc-&gt;getElementsByTagName('title');
  $desc = $doc-&gt;getElementsByTagName('description');
  $ctg = $doc-&gt;getElementsByTagName('category');
  $pd = $doc-&gt;getElementsByTagName('pubDate');
  $ab = $doc-&gt;getElementsByTagName('link');
  $aut = $doc-&gt;getElementsByTagName('author');
  
  
  for ($i = 1; $i &lt; $desc-&gt;length; $i++) {
  
      $dsc = $desc-&gt;item($i);
      $titles = $nodes-&gt;item($i);
      $categorys = $ctg-&gt;item($i);
      $pubDates = $pd-&gt;item($i);
      $links = $ab-&gt;item($i);
      $autors = $aut-&gt;item($i);
  
      $description = $dsc-&gt;nodeValue;
      $title = $titles-&gt;nodeValue;
      $category = $categorys-&gt;nodeValue;
      $pubDate = $pubDates-&gt;nodeValue;
      $link = $links-&gt;nodeValue;
      $autor = $autors-&gt;nodeValue;
  
      echo 'Title:' . $title . '&lt;br/&gt;';
      echo 'Description:' . $description . '&lt;br/&gt;';
      echo 'Category:' . $category . '&lt;br/&gt;';
      echo 'Datum ' . gmdate("D, d M Y H:i:s",
         strtotime($pubDate)) . " GMT" . '&lt;br/&gt;';
      echo "Autor: $autor" . '&lt;br/&gt;';
      echo 'Link: ' . $link . '&lt;br/&gt;&lt;br/&gt;';
  }
  }
  </code></pre>
  
  <p>Can you please help me with this?</p>