I have site that is on wordpress. I want to make a PHP Script that will parse XML content from the URL and show me in the form of table.
I had written below PHP Script to parse the data
<?php
$xml = simplexml_load_string(file_get_contents($url));
foreach ($xml->url as $url)
{
?>
Loc: <?php echo $url->loc; ?>
<br />
Last Modified: <?php echo $url->lastmod; ?>
<br />
Image Title: <?php echo $xml->children('image', true)->image->title; ?>
<br />
Image Location: <?php echo $xml->children('image', true)->image->loc; ?>
<hr />
<?php
}
?>
Problem The Above PHP Script is working fine to parse Loc & Last Modified But Not Working for Image Loc & Image Title. Sitemap URL
view-source:http://getintoblog.com/post-sitemap.xml
Kindly Help.