Querying for a set sequence against an XML Document

Discussion in 'XML' started by manojas@hotmail.com, Aug 1, 2006.

  1. Guest

    What is an appropriate query to do this regular expression like
    matching on an XML doc
    What I DO NOT want to do is use DOM/SAX and process the tree in the
    client side

    I need to figure out if a sequence of nodes appear in order.
    Given an XML
    (1)
    <Root>
    <Data Tag="A"/>
    <Node>
    <Data Tag="B"/>
    .
    .
    <Data Tag="C"/>
    </Node>
    <Root>

    In the above document (1) the tags {A,B,C} appears in order,hence the
    query returns true.In the case below the tags are not inorder
    and {C,B,A} hence the query returns false
    (2)
    <Root>
    <Data Tag="C"/>
    <Data Tag="B"/>
    <Data Tag="A"/>
    <Root>

    Like the document shown above the nodes neednt be in the same
    hierarchy. Also note that I am interested in
    a pattern A*B*C, ie the doc below is fine
    (3)
    <Root>
    <Data Tag="A"/>
    <Data Tag="B"/>
    <Data Tag="D"/>
    <Data Tag="C"/>
    <Root>


    Thanks in advance
    Manoj
     
    , Aug 1, 2006
    #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. Replies:
    2
    Views:
    589
  2. VJ
    Replies:
    4
    Views:
    442
    Dimitre Novatchev
    Nov 7, 2003
  3. Tony Prichard
    Replies:
    0
    Views:
    756
    Tony Prichard
    Dec 12, 2003
  4. Manish Hatwalne
    Replies:
    1
    Views:
    406
    Martin Honnen
    Jul 13, 2004
  5. Replies:
    1
    Views:
    406
    Martin Honnen
    Oct 28, 2004
Loading...

Share This Page