I am trying to search for document XMLs in Marklogic which have the elements <document>
more than once. Following is the structure of one such document XML i want to retrieve:
<root>
<documents>
<document>
<id>1</id>
<name>roy</name>
<otherData></otherData>
</document>
<document>
<id>2</id>
<name>roy</name>
<otherData></otherData>
</document>
....
...
..
.
<document>
<id>3</id>
<name>roy</name>
<otherData></otherData>
</document>
</documents>
</root>
I do not want to retrieve the XMLs which are of the following structure:
<root>
<documents>
<document>
<id>3</id>
<name>roy</name>
<otherData></otherData>
</document>
</documents>
</root>
I can search for existence or minimum one using element-query
with xs:QName("document")
, but not sure how to go about searching with more than one.
Any help would be much appreciated.