[MarkLogic Dev General] search multiple paths

Pradeep Maddireddy Pradeep.Maddireddy at HTCinc.com
Mon Feb 23 11:33:06 PST 2009


Hi..!

 

I will be storing multiple XML documents in the database with the
following structure

 

<wrapper>

<metadata>

<author>John</author>

<publisher>John</ publisher >

</metadata>

 

<original-content>

<item>

<Category>fruit</Category>

<name>Apple</name>

</item>

<item>

<Category>fruit</Category>

<name>Orange</name>

</item>

<item>

<Category>flower</Category>

<name>Jasmine</name>

</item>

</original-content>

 

</wrapper>

 

The "metadata" node structure will be same for all documents but the
"original-content" node structure can be different in different
documents.

How can we build a query which will pick all the documents that have
"/metadata/author" as John and have the text "fruit" any where in the
document.

 

I also have to handle pagination in the same query.

 

Thanks in advance.

 

Regards,

Pradeep Maddireddy

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20090223/b3d52bac/attachment.html


More information about the General mailing list