Re: Simple xPath. Specyfication lapse?

Discussion in 'XML' started by Richard Tobin, Apr 16, 2009.

  1. In article <gs7dk8$3v0$>, szomiz <> wrote:

    ><root i="1">
    > <div i="2">
    > <other i="3">
    > <para i="4"/>
    > </other>
    > <para i="5"/>
    > </div>
    ></root>


    >tt=txml.documentElement.selectNodes('div//para');


    I'm not familiar with the Microsoft libraries you're using, but
    presumably this should give you the two nodes <para i="4"/> and
    <para i="5"/>.

    >WScript.Echo(tt[0].xml)


    And presumably this should give you the first (in document order) of
    those two nodes, which it does:

    >Result: <para i="4"/>


    Bear in mind that XPath 1 talks about node *sets*, and the indexing
    operation on these sets use document order, not the order they are
    generated by some algorithm.

    -- Richard
    --
    Please remember to mention me / in tapes you leave behind.
    Richard Tobin, Apr 16, 2009
    #1
    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,963
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,390
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    514
  4. goog
    Replies:
    0
    Views:
    503
  5. Martin Honnen
    Replies:
    0
    Views:
    587
    Martin Honnen
    Apr 16, 2009
Loading...

Share This Page