Dreamweaver Club Forums

Dreamweaver Club Forums (http://www.dreamweaverclub.com/forum//index.php)
-   Spry (http://www.dreamweaverclub.com/forum//forumdisplay.php?f=189)
-   -   Noob needing help with spry filtering (http://www.dreamweaverclub.com/forum//showthread.php?t=43505)

lembi2001 09-21-2012 12:06 AM

Noob needing help with spry filtering
 
Hi all

This is my first ever attempt at inserting a spry dataset into a page.

I'm using the following xml dataset to supply the data for my table:

PHP Code:

<prices>
 <
pricelist currency="usd">
  <
price timestamp="1348175700" per="ozt" commodity="gold">1768.20</price>
  <
price timestamp="1348175460" per="ozt" commodity="palladium">662.50</price>
  <
price timestamp="1348174500" per="ozt" commodity="platinum">1627.00</price>
  <
price timestamp="1348175640" per="ozt" commodity="silver">34.65</price>
 </
pricelist>
 <
pricelist currency="eur">
  <
price timestamp="1348175700" per="ozt" commodity="gold">1363.64</price>
  <
price timestamp="1348175460" per="ozt" commodity="palladium">510.92</price>
  <
price timestamp="1348174500" per="ozt" commodity="platinum">1254.74</price>
  <
price timestamp="1348175640" per="ozt" commodity="silver">26.72</price>
 </
pricelist>
 <
pricelist currency="chf">
  <
price timestamp="1348175700" per="ozt" commodity="gold">1650.08</price>
  <
price timestamp="1348175460" per="ozt" commodity="palladium">618.25</price>
  <
price timestamp="1348174500" per="ozt" commodity="platinum">1518.32</price>
  <
price timestamp="1348175640" per="ozt" commodity="silver">32.34</price>
 </
pricelist>
</
prices

This works fine, however i want to filter it on the xpath for @currency=usd. This is a dynamically generated xml file and as such i cannot just delete the rows i don't need.

Anyone able to help me?

To clarify (as i tend to over explain things) i just want this section:
PHP Code:

<prices>
 <
pricelist currency="usd">
  <
price timestamp="1348175700" per="ozt" commodity="gold">1768.20</price>
  <
price timestamp="1348175460" per="ozt" commodity="palladium">662.50</price>
  <
price timestamp="1348174500" per="ozt" commodity="platinum">1627.00</price>
  <
price timestamp="1348175640" per="ozt" commodity="silver">34.65</price>
 </
pricelist>
</
prices

Thanks very much for taking the time to read this


All times are GMT. The time now is 07:45 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com