Selvam,
Can you share a sample of your XML? It's hard to tell why it's not working
without the actual
data that you're trying to run this against. I can tell you though, that you
won't have much luck
using the doc() function. You'd instead want to just omit it all together and
use /OAI-PMH/...
I tried using the XQuery "/OAI-PMH/ListSets/set/setSpec/text()" against the
following XML:
<OAI-PMH>
<ListSets>
<set>
<setSpec>test</setSpec>
</set>
</ListSets>
</OAI-PMH>
I got back the expected result of simply "test".
With a sample that is more representative of your actual XML I may be able to
offer more assistance.
Thanks
-Mark
> On Sep 13, 2016, at 8:22 AM, Selvam Raman <[email protected]> wrote:
>
> Hi ,
>
> Need your help techies.
>
> I am using GetHttp to pull the data and it is coming as xml file.(have
> mentioned the url and filename).
>
> want to extract field value from the xml using Evaluate Xquery.
>
> I have tried this two but nothing is working
>
> 1) for $x in doc("selmna.xml")/OAI-PMH/ListSets/set
> return data($x/setSpec)
>
> 2)//setSpec or /OAI-PMH/ListSets/set/setSpec/text()
>
> Can you please help me, what am i missing here.
>
> --
> Selvam Raman
> "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"