Christian GrĂ¼n christian.gruen@gmail.com:
Hi Christian, thanks!
If you want to know the number of child elements from the root elements, you could run a simple XPath expression via the input bar [2] or editor panel [3] after opening the database:
count(/*/*)
That only gives me the total number of child elements of the document elements, I think...?
(The result was 14 in this case).
I have a document with a structure like this <Top> <A> <Achild></Achild> <Achild></Achild> <A> <B> <Bchild></Bchild> <Bchild></Bchild> ... <B> ... </Top>
And what I'm actually looking for in this case, is a list of the top level element names ("A" and "B" in my example) together with a count of their children.
I have tried to google up examples of XQuery expressions to do this today, but I haven't had any success in creating the desired results.
As an alternative, you can first use the visualization to select the initial nodes, filter it (using the funnel icon in the upper right corner of the window) and then run the simple query * to see the number of results in the upper right corner.
Hm... I selected a second level element in the Map, filtered it, and typed "select *" in the command window, and the upper right corner shows "0 Results".
Does this help?
It's a step on the way. Thanks! :-)
Do you have some basic experience with XPath or XQuery?
No experience with XQuery prior to today, but a fair amount of XSLT experience (which implies familiarity with XPath) back in 2000-2005 or thereabouts. But it's been a while.