A
A Amitkashaw
Hi Everyone.
I'm having a few problems with the following XSL statement -
<xsl:template match="htm:div[text()='Fred's List of Things:']">
<xsl:for-each
select="../following-sibling::*/child::htm:i[text()='Guitars:']">
<xsl:value-of select="text()"/>
</xsl:for-each>
</xsl:template>
It returns the ELEMENT 'Guitars:' but what I need is the text after it. I'm
stumped if I can figure out how to get this value to return. The reason why
I'm using the above XML is because there are lots of other <i> ELEMENTS
within the document with the text 'Guitars:' and I need Fred's guitar choice
specifically.
Here's the XML:
- <td>
<div align="right">Fred's List of Things:</div>
</td>
<td>
<i>Hobbys:<i>
Reading, Writing, painting, riding bikes
<br />
<i>Books I have read:</i>
Animal Farm,
<br />
<i>Guitars:</i>
1 Gibson Les Paul
<br />
<i>Cars:</i>
None, I like riding my bike everywhere
<br/>
</td>
Thanks for your time in this matter.
- S
I'm having a few problems with the following XSL statement -
<xsl:template match="htm:div[text()='Fred's List of Things:']">
<xsl:for-each
select="../following-sibling::*/child::htm:i[text()='Guitars:']">
<xsl:value-of select="text()"/>
</xsl:for-each>
</xsl:template>
It returns the ELEMENT 'Guitars:' but what I need is the text after it. I'm
stumped if I can figure out how to get this value to return. The reason why
I'm using the above XML is because there are lots of other <i> ELEMENTS
within the document with the text 'Guitars:' and I need Fred's guitar choice
specifically.
Here's the XML:
- <td>
<div align="right">Fred's List of Things:</div>
</td>
<td>
<i>Hobbys:<i>
Reading, Writing, painting, riding bikes
<br />
<i>Books I have read:</i>
Animal Farm,
<br />
<i>Guitars:</i>
1 Gibson Les Paul
<br />
<i>Cars:</i>
None, I like riding my bike everywhere
<br/>
</td>
Thanks for your time in this matter.
- S