XSLT: problem with Xpath

F

Flyzone

i think i don't anderstand the use of xpath :-(
Someone could help me?

XML file:
<result>
<delete>
<ok>
<tittle>Deleted ok</title>
<msg>The id was deleted</msg>
</ok>
</delete>
<delete>
<ko>
<title>Deleted fail!</title>
<msg>The id was NOT deleted</msg>
</ko>
</delete>
</result>


I would like to create a XSLT to select just ONE title and ONE msg,
but i never had succes....i always get the two result (ok and ko).
I tried much xslt...without success :-(

Fly
 
M

Mike King

Flyzone said:
i think i don't anderstand the use of xpath :-(
Someone could help me?

XML file:
<result>
<delete>
<ok>
<tittle>Deleted ok</title>
<msg>The id was deleted</msg>
</ok>
</delete>
<delete>
<ko>
<title>Deleted fail!</title>
<msg>The id was NOT deleted</msg>
</ko>
</delete>
</result>


I would like to create a XSLT to select just ONE title and ONE msg,
but i never had succes....i always get the two result (ok and ko).
I tried much xslt...without success :-(

Fly

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates select="result/delete/ok" />
</xsl:template>
</xsl:stylesheet>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top