Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Querying for a set sequence against an XML Document

Reply
Thread Tools

Querying for a set sequence against an XML Document

 
 
manojas@hotmail.com
Guest
Posts: n/a
 
      08-01-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validating parsed XML document against XML-schema TKok Java 1 12-08-2005 02:01 PM
Validate Document object against Schema without reparsing the xml veerleverbr@hotmail.com Java 2 06-28-2005 07:42 AM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM
Help with Querying XML Document VJ XML 4 11-07-2003 06:02 AM



Advertisments