eclipsetalk
Programmer
- Nov 15, 2008
- 2
Hello,
I want to create a XSLT transform to convert an XML to another XML to add attribute to elements such as:
I need to transform:
<node>
<Title>Hotel</Title>
<image>//files/hotel.png</image>
</node>
to:
<node>
<Title>Hotel</Title>
<image href="//files/hotel.png"></image>
</node>
I think that I need to add <xsl:attribute name="href">//files/hotel.png</xsl:attribute> but I don't know how to define the rest of the xslt file.
Thanks in advance for any help with this novice question...
I want to create a XSLT transform to convert an XML to another XML to add attribute to elements such as:
I need to transform:
<node>
<Title>Hotel</Title>
<image>//files/hotel.png</image>
</node>
to:
<node>
<Title>Hotel</Title>
<image href="//files/hotel.png"></image>
</node>
I think that I need to add <xsl:attribute name="href">//files/hotel.png</xsl:attribute> but I don't know how to define the rest of the xslt file.
Thanks in advance for any help with this novice question...