|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
I have the following data
<item><name>abc<name><color>red</color><price>15</price></item> <item><name>abc<name><color>blue</color><price>15</price></item> <item><name>abc<name><color>green</color><price>15</price></item> <item><name>fff<name><color>red</color><price>15</price></item> <item><name>fff<name><color>blue</color><price>15</price></item> <item><name>fff<name><color>green</color><price>15</price></item> Now i want to get output like this: <item-name>abc</item-name> <color>red<red> <price>15</price> <color>blue<red> <price>15</price> <color>green<red> <price>15</price> <item-name>fff</item-name> <color>red<red> <price>15</price> <color>blue<red> <price>15</price> <color>green<red> <price>15</price> Any help would be greatly appreciated....THANKS!!! |
|
#2
|
|||
|
|||
|
.. xsl header ...
Code:
<xsl:template match="/item"> <xsl:element name="item-name"> <xsl:value-of select="name/text()" /> </xsl:element> <xsl:element name="color"> <xsl:value-of select="color/text()" /> </xsl:element> <xsl:element name="price"> <xsl:value-of select="price/text()" /> </xsl:element> </xsl:template> ... xsl footer ... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > xslt help!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|