[xquery-talk] How can I search specific value through XQuery

G. Ken Holman gkholman at CraneSoftwrights.com
Tue Mar 29 07:48:42 PST 2011


At 2011-03-29 17:12 +0530, Kunal Chauhan wrote:
>I tried as per your suggestion and it's works for me

Good.

But I misspoke with my last comment:

>On Tue, Mar 29, 2011 at 4:46 PM, G. Ken Holman 
><<mailto:gkholman at cranesoftwrights.com>gkholman at cranesoftwrights.com> wrote:
>To make the result well-formed, you'll need to wrap the query around 
>a result document element.

Of course it is the other way around, you have to wrap the query 
*with* a result document element, not around a result document element.

   <end-result>
     for $x in $docs2/result where $x[@href = 'abc'] return $x
   </end-result>

I hope this helps.

. . . . . . . . . Ken

--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/q/
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal



More information about the talk mailing list