I have been looking at a few examples on parsing xml in php but everything seems complex.
My XML code looks like the following:
I am trying to get it so for each Listing section I can pull the title, description and link info and make a link on my page.Code:<RESULTS> <LISTING> <RANK>1</RANK> <TITLE>my title</TITLE> <DESCRIPTION>my description</DESCRIPTION> <SITEHOST>http://domain.com</SITEHOST> <LINK>http://test.com</LINK> </LISTING> <LISTING> <RANK>2</RANK> <TITLE>other title</TITLE> <DESCRIPTION>other description</DESCRIPTION> <SITEHOST>http://otherdomain.com</SITEHOST> <LINK>http://othertest.com</LINK> </LISTING> </RESULTS>
Does anyone have a easy example that works with my versions?HTML Code:<a href="http://test.com">My Title</a><br>my description<br> <a href="http://othertest.com">Other Title</a><br>other description<br>
What I am working with:
PHP Version 4.1.2
XML Support:active
XML Namespace Support:active
EXPAT Version:expat_1.95.2
MySQL Ver: 3.23.49
DOM/XML:enabled
libxml Version:2.4.19
XPath Support:enabled
XPointer Support:enabled


Reply With Quote