php & xml parsing
Posted: Fri Oct 03, 2008 6:29 am
Hi guys,
Been using this tutorial http://www.kirupa.com/web/xml_php_parse ... ediate.htm
all working well, however it only shows how to gather info from tags ie:
what if i wanted only HEADLINE tags with a certain attribute i.e headline tag with id = 1:
Something like this:
maybe? or if not what keywords should I use in google?
Thanks guys
Been using this tutorial http://www.kirupa.com/web/xml_php_parse ... ediate.htm
all working well, however it only shows how to gather info from tags ie:
Code: Select all
$xml_headline_key = "*NEWS*STORY*HEADLINE";
Code: Select all
<?xml version="1.0"?>
<news>
<story>
<headline> Godzilla Attacks LA! </headline>
<headline id = "1"> The Monster Arrives</headline>
<description>Equipped with a Japanese Mind-control device, the giant monster has attacked important harbours along the California coast. President to take action. </description>
</story>
</news>
Code: Select all
$xml_headline_key = "*NEWS*STORY*HEADLINE[@id="1"];
Thanks guys