Good day,
I would like to know if someone know how to get the value 31636 out of the tag <os:totalResults>31636</os:totalResults> using simpleSMLELEMENT
<?xml version=‘1.0’ encoding=‘UTF-8’?>
<feed xmlns=“http://www.w3.org/2005/Atom” xmlns: os=“http://a9.com/-/spec/opensearch/1.1/” xmlns:as=“http://atomserver.org/namespaces/1.0/” xmlns:georss=“http://www.georss.org/georss” xmlns:gml=“http://www.opengis.net/gml” xml:base=“http://beta.geogratis.gc.ca/api/en/”>
<as:endIndex>27784</as:endIndex>
<os:totalResults>31636</os:totalResults>
With the following I’m getting the title, but getting access to namespace xmlns: os=“http://a9.com/-/spec/opensearch/1.1/” remains a mystery. Thanks in advance to give my some help.
$feed = new SimpleXMLElement($xml);//produce_XML_object_tree($xml);
$second_entry_title = $feed->entry[0]->title;
echo $second_entry_title . '<br/>';