|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
filtering xml output using xsl for-each select
I'm having difficulty filtering the xml output below
computerStore storeName="Mac Store">[code] <model picture="images/imac.jpg">[code] <name type="desktop">iMac</name> <package>A</package> <cpu speed="600">600MHz PowerPC G3</cpu> <memory mem="128">128MB SDRAM</memory> <hd size="40">40GB Ultra ATA drive</hd> <drive>CD-ROM</drive> <video>Rage 128 Ultra graphics</video> <modem>56K internal modem</modem> <price>799</price> <tax>0.14</tax> <shipping>20</shipping> </model> </computerStore> I'm trying to write a stament that selects all desktop computers and its features(name,package, cpu) for each desktop computers I created this stament: <xsl:for-each select="computerStore/model["name/[@type='desktop']"]"> however its not working. What am I doing wrong? And another thing, how do I format code when I post on forum? Please Help getchoo |
|
#2
|
|||
|
|||
|
Hello,
I hope this will help <xsl:for-each select="computerStore/model[name[@type='desktop']]"> I did not get u regarding the formatting. |
|
#3
|
|||
|
|||
|
Hi thanx it worked....
Hi
What I meant by the second question is whenever I paste my code on this forum, the indentations and nesting is not preserved. How do I paste my code on this forum and it looks exactly like my original code. Thanx getchoo |
|
#4
|
|||
|
|||
|
Hi
I guess this is something u have to ask the moderator. They could help u in this regard. Reem |
|
#5
|
|||
|
|||
|
getchoo,
try this: [ CODE] ...insert code here [ /CODE] and remove the space between [ and C same for [ and / justin.dago(); |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > filtering xml output using xsl for-each select |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|