hi to all m lil bit confuse as m beginner to the xml+xpath. so m sorry if i m unable to ask any kind of wrong question.
now the question is m trying to accessing the name of the of the attribute of xml file using xpath and tyring to print it on the screen using php but m unable to do...
here is the xml statement for which m trying
<product>
<price currency="EUR">9.95</price>
<productURL>http://www.example.com</productURL>
<imageURL>http://www.example.com/store/images/products/medium/9789033634628.jpg</imageURL>
<description>Not Available</description>
<categories>
<category path="Nederlands / Religie & Spiritualiteit / Religie /"></category>
</categories>
</product>
as i want to print out the following attribute name:Nederlands / Religie & Spiritualiteit / Religie /
for the other information i have done the job but for accessing the category m unable to do so...plz help out me to access the category name.
following is my work done for accessing the mentioned category.
$cat = $xml->xpath("/product[1]/categories/category");
foreach($cat as $category)
{
echo 'Category:';
echo $category.'<br/>';
}