[xquery-talk] "XQuering"

Frank Cohen fcohen at rainingdata.com
Sat Sep 17 00:11:55 PDT 2005

How about this? -Frank

for $f in doc("xqnow1.xml")/root/item
   where count($f/subitem)>0 and count($f/metaitem)>0
return count($f)

On Sep 16, 2005, at 9:16 PM, Elarrat, EFC wrote:

> Hello everybody. Lately I've been trainning some xqueries and I  
> guess I'm learning a lot about it. But, as the novice I am, I need  
> some help of you, though. I tried to do a query, but I realized I  
> couldn't do it with my limited knowledge on the subject, so here I am.
> What I'm trying to do is the following:
> I have this XML structure:
> <root>
> <item>
> <subitem>textaboutsomething</subitem>
> <metaitem>metatextaboutsubitem</metaitem>
> </item>
> </root>
> And I would like to build a query that brings me the number of  
> times that the subitem X comes with the metaitem Y. Anybody could  
> help me? Thanks everybody for your big attention.
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk

More information about the talk mailing list