Hey guy's I have a SOAP call that returns something like this:
<?xml version="1.0"
encoding="utf-8"?><item> <dailystats>
<date>2011-03-18</date>
<impressions>17</impressions>
<clicks>1</clicks> <leads>1</leads>
<num_sales>0</num_sales> <sales>
0.00</sales> <sub_sales> 0.00</sub_sales> <commission> 1.10</commission> click_thru_ratio>5.88%</click_thru_ratio>
</dailystats> </item>
Now I want to make a script that posts this in a readable format. For example I want it to look like this:
Clicks: ( then here it searches in the code above for the ammount of clicks and posts them here ).
Is this possible and co开发者_StackOverflow中文版uld anyone help me out?
You can display your XML document with xslt
See : http://www.codewalkers.com/c/a/Miscellaneous/Transforming-XML-with-XSLT-and-PHP/3/
Always think template when you want to display data, and xslt is a perfect template engine.
精彩评论