Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract values of mixed elements?

Status
Not open for further replies.

sulacco

Technical User
Joined
Nov 8, 2002
Messages
74
Location
RU

I've got this structure:

...
<site>
<menu>
<first>AAA
<one>1</one>
<one>2</one>
<one>3</one>
<one>4</one>
<one>5</one>
</first>

<first>BBB
<one>1</one>
</first>
<first>CCC
<one>1</one>
<one>2</one>
</first>

<first>DDD
<one>1</one>
<one>3</one>
</first>
</menu>
</site>

...
How can I extract values of <first> elements but not the values of <one>.

the return result must be: AAA, BBB, CCC, DDD. I did this:

...
<xsl:for-each select=&quot;/site/menu//first&quot;>
<xsl:value-of select=&quot;.&quot;/>
</xsl:for-each>
...
and got everything which is not the objective. What's wrong?




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top