Re: json serialize problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: json serialize problem

Grant MacKenzie
> I have do a json serialize out put test in develop version exide., the script:

> collection('/db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"],

Check your dataset instance with 'instance of'
I think you will find you want a 'instance of element()'
not  'instance of document-node()' for your result dataset
try to get the root element with '/*'
eg. /db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"]/*

http://www.xqueryfunctions.com/xq/functx_node-kind.html
http://stackoverflow.com/questions/8554543/element-vs-node-in-xquery
--
Take Care
Grant Mackenzie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: json serialize problem

lin_xd
this maybe better:
<root>{ collection('/db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"]}</root>



--
此致

 easy

莫愁前路无知己,天下谁人不识君。


At 2017-04-26 05:18:26, "Grant MacKenzie" <[hidden email]> wrote: >> I have do a json serialize out put test in develop version exide., the script: > >> collection('/db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"], > >Check your dataset instance with 'instance of' >I think you will find you want a 'instance of element()' >not 'instance of document-node()' for your result dataset >try to get the root element with '/*' >eg. /db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"]/* > >http://www.xqueryfunctions.com/xq/functx_node-kind.html >http://stackoverflow.com/questions/8554543/element-vs-node-in-xquery >-- >Take Care >Grant Mackenzie > >------------------------------------------------------------------------------ >Check out the vibrant tech community on one of the world's most >engaging tech sites, Slashdot.org! http://sdm.link/slashdot >_______________________________________________ >Exist-open mailing list >[hidden email] >https://lists.sourceforge.net/lists/listinfo/exist-open


 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open