[xquery-talk] navigating in xml file

fatma helmy fatmahelmy2000 at yahoo.com
Tue Jun 20 09:26:15 PDT 2006


how to navigate in an xml file breadth then depth
based on node frequency.
example:-
let $j:= <doc>
         <head>
             <a> <c> </c>  
             </a> 
         </head>
         <head>
             <a>`<c> </c>  
             </a>
         </head>
         <head>
             <a> <d> </d>  
             </a>
         </head>
         <head>
             <f> <c> </c>  
             </f> 
         </head>
         <head>
             <f>`<c> </c>  
             </f>
         </head>
         <head>
             <f> <d> </d>  
             </f>
         </head>

         <head>
             <b>  
             </b>
         </head>
         </doc>

i need to get all distinct decsendat nodes of head and
count their frequency and choose those with frequency
greater than cretain ratio, a,f is repeated 3 times
relative to head while b is reapeated only once so i
will trim b bracnh and take a , f branch individually
and then get distinct desendant of a , we will find c
repeated twice relative to a, while d is repated only
one , so i will go through c branch , and so for f as
well.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the talk mailing list