0

Suppose you have an xml file that has a portion that looks like:

<div id="California">The cat is in the house
<p>The horse is also in the house</p>
<div><a href="wwww.whatever.com" /><p>Another pigeon?</p></div>
</div>

Since the top div here is buried somewhere within the file, I am trying to isolate it with
<xsl:template match="//div[@id="California">
<xsl:value-of select="????">
...

but I want the only thing to get transferred to the output file to be "The cat is in the house" I realize that in the node tree that forms the input, this is the text child of the <div id="California> tag, but I don't know how to get the this to be selected by the
<xsl:value-of> tag. How do I do that?

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by achava
0

It is indeed the first text node, so cool, now you know why I am a newbie. I wll try this momentarily.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.