|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
XML queries
Tough questions.
Say I have the following xml script : <DATA> <STOCK NAME="Microsoft" INDUSTRY="Software" /> <QUOTES COMPANY_NAME="Microsoft"> <TRADE PRICE="56" HIGH="80" /> <TRADE PRICE="66" HIGH="85" /> <TRADE PRICE="58" HIGH="79" /> </QUOTES> <STOCK NAME="Intel" INDUSTRY="Hardware" /> <QUOTES COMPANY_NAME="Intel"> <TRADE PRICE="42" HIGH="60" /> <TRADE PRICE="32" HIGH="75" /> <TRADE PRICE="38" HIGH="62" /> </QUOTES> </DATA> How can I parse the code(i'm using PHP) to show only trade data(eg. price) for only Microsoft? Does XML have a whereas function or something similar?? thanx |
|
#2
|
|||
|
|||
|
Use XSLT, good articles can be found on Devshed:
http://www.devshed.com/Server_Side/...ics/XSLBasics1/
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML queries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|