August 10th, 2002, 04:59 AM
filtering xml output using xsl for-each select
I'm having difficulty filtering the xml output below
computerStore storeName="Mac Store">[code]
<cpu speed="600">600MHz PowerPC G3</cpu>
<memory mem="128">128MB SDRAM</memory>
<hd size="40">40GB Ultra ATA drive</hd>
<video>Rage 128 Ultra graphics</video>
<modem>56K internal modem</modem>
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?
August 10th, 2002, 04:26 PM
I hope this will help
I did not get u regarding the formatting.
August 10th, 2002, 09:04 PM
Hi thanx it worked....
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.
August 11th, 2002, 02:49 AM
I guess this is something u have to ask the moderator. They could help u in this regard.
August 11th, 2002, 12:01 PM
[ CODE] ...insert code here [ /CODE]
and remove the space between [ and C
same for [ and /