note 85566 modified in function.simplexml-element-children by danbrown
| From: | danbrown@php.net | Date: | Wed, 16 Sep 2009 15:33:26 +0000 |
| Subject: | note 85566 modified in function.simplexml-element-children by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-160632@lists.php.net to get a copy of this message | ||
for XML namespaces such as <dc:creator> in RSS feeds use
<?php
$xml = new SimpleXMLElement($string);
$item = $xml->channel[0]->item[0];
$dc = $item->children("http://purl.org/dc/elements/1.1/");
echo $dc->creator;
?>
--was--
for XML namespaces such as <dc:creator> in RSS feeds use
<?php
$xml = new SimpleXMLElement($string);
$item = $xml->channel[0]->item[0];
$dc = $item->children("http://purl.org/dc/elements/1.1/");
echo $dc->creator;
?>
http://php.net/manual/en/function.simplexml-element-children.php