title: DomDocument doesn't see <enclosure url=""/>
body: <p>I'm using a PHP script that retrieve RSS and sent it as JSON.</p>
  
  <p>it began by</p>
  
  <pre><code>$feed = new DOMDocument();
  $feed-&gt;load($_GET['url']);
  </code></pre>
  
  <p>The feed I use looks like (URL: <a href="https://www.dealabs.com/rss/new.xml" rel="nofollow noreferrer">RSS FEED</a>)</p>
  
  <p><a href="https://i.stack.imgur.com/cmCRF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cmCRF.png" alt="enter image description here"></a></p>
  
  <p>and has a nice  under .</p>
  
  <p>I saw that I couldn't access to this data. In fact, when I 
      var_dump($feed);
  I didn't see any notion of enclosure and no notion of <a href="https://MYURL.COM/MYPATH" rel="nofollow noreferrer">https://MYURL.COM/MYPATH</a></p>
  
  <p>So questions: WHY and HOW :-)</p>
  
  <p>Thanks !</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>HERE is the full script and var dump content:</p>
  
  <pre><code>&lt;?php
  header('Content-Type: application/json');
  $feed = new DOMDocument();
  $feed-&gt;load($_GET['url']);
  
  $json = array();
  
  $json['title'] =  $feed-&gt;getElementsByTagName('channel')-&gt;item(0)-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
  $json['description'] = $feed-&gt;getElementsByTagName('channel')-&gt;item(0)-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
  $json['link'] =  $feed-&gt;getElementsByTagName('channel')-&gt;item(0)-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
  
  
  $items = $feed-&gt;getElementsByTagName('channel')-&gt;item(0)-&gt;getElementsByTagName('item');
  $json['items'] = array();
  $i = 0;
  foreach($items as $item) {
     $json['items'][$i]['title'] = $item-&gt;getElementsByTagName('title')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
     $json['items'][$i]['description'] = $item-&gt;getElementsByTagName('description')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
     $json['items'][$i]['pubdate'] = $item-&gt;getElementsByTagName('pubDate')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
     $json['items'][$i]['guid'] = $item-&gt;getElementsByTagName('guid')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
     $json['items'][$i]['link'] = $item-&gt;getElementsByTagName('link')-&gt;item(0)-&gt;firstChild-&gt;nodeValue;
     //$json['items'][$i]['url'] = $item-&gt;getELementsByTagName('nodeValue')-&gt;item(0)-&gt;firstChild-&gt;getAttribute('url');
  
      $i++;
  }
  
  echo json_encode($json);
  ?&gt;
  </code></pre>
  
  <p>VAR DUMP of $feed when <a href="https://www.dealabs.com/rss/new.xml" rel="nofollow noreferrer">https://www.dealabs.com/rss/new.xml</a> url is passed in params (too long to be here): <a href="https://pastebin.com/UbgJdFrE" rel="nofollow noreferrer">pastebin</a> </p>