<url>
<loc>http://example.com</loc>
<news:news>
<news:publication_date>2015-05-11</news:publication_date>
<news:title>Some news content</news:title>
<news:keywords/>
</news:news>
</url>
<url>
<loc>http://example2.com</loc>
<news:news>
<news:publication_date>2015-05-12</news:publication_date>
<news:title>Some news content 2</news:title>
<news:keywords/>
</news:news>
</url>
How can get news:publication_date, news:title, news:keywords
I can get <loc>
's value but <news:
tag getting null
$xml=simplexml_load_file("http://example.com") or die("Error!");
foreach($xml->url as $key){
$URL = $key->loc;
//What should I do here to get title, keywords, publication_date
}