Popple3 Posted December 23, 2007 Share Posted December 23, 2007 I can get the information from tags, however there are two tags in the XML (that I have no control over) called media:group and media:thumbnail. When entered (as in the code below), i get an "unexpected ':'" parse error. I'm looking for a simple solution. I'm not very familiar with PHP, so examples would be helpful. Thanks in advace <?php include('xmlparser.php'); //Get the XML document loaded into a variable $xml = file_get_contents('http://picasaweb.google.com/data/feed/api/user/popple3?kind=album'); //Set up the parser object $parser = new XMLParser($xml); //Work the magic... $parser->Parse(); //Echo the title and image of each <entry> foreach($parser->document->entry as $entry) { $imgurl = $entry->media:group->media:thumbnail->tagAttrs['url']; echo $entry->title[0]->tagData; echo "<img src=\"" . $imgurl . "\">"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/82939-problem-parsing-xml-in-php4/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.