XSLT: problem with Xpath

Discussion in 'XML' started by Flyzone, Jan 25, 2005.

  1. Flyzone

    Flyzone Guest

    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
     
    Flyzone, Jan 25, 2005
    #1
    1. Advertising

  2. Flyzone

    Mike King Guest

    Re: problem with Xpath

    "Flyzone" <> wrote in message
    news:...
    >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>
     
    Mike King, Jan 25, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,993
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,442
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Patrick Reilly

    XSLT and XPath lookup problem

    Patrick Reilly, Sep 27, 2003, in forum: XML
    Replies:
    1
    Views:
    633
    Dimitre Novatchev
    Sep 28, 2003
  4. Tjerk Wolterink

    XSLT xpath problem

    Tjerk Wolterink, Jul 14, 2005, in forum: XML
    Replies:
    3
    Views:
    388
    Mukul Gandhi
    Jul 14, 2005
  5. Pathik
    Replies:
    1
    Views:
    473
Loading...

Share This Page