This question already has an answer here:
I have a XML file for my project work.I need to fetch the data from the XML file.The file contains something like the following:
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:szgd="http://www.spotzot.com/gdfeed" xmlns:szbb="http://www.spotzot.com/bbfeed">
<channel>
<item>
<title>Service & Maintenance under $50</title>
<description>7 Items | Prestone, Campbell Hausfeld, Custom Accessories, Custom, KD Tools</description>
<szgd:instore>Y</szgd:instore>
</item>
</channel>
</rss>
I am using $newtitle=$newxml->channel->item->title;
to fetch data from title.It successfully returned the title.
How can I fetch the data from tag in my page using php?
</div>