Hi all,
On Mon, Aug 08, 2005 at 09:31:07AM +0200, Ying Zhang wrote: [...]
In Mserver, you can use the command "xquery" to execute an xquery (don't forget to use "print" to get the output on the screan):
MonetDB>xquery("xml", "doc("HelloWorld.xml")/doc/greet").print(); [ "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<XQueryResult>\n<greet kind="informal">Hi </greet><greet kind="casual">Hello </greet>\n</XQueryResult>\n" ]
[...]
Please note, the ".print()" is only necessary if you are using the development version as of MonetDB/XQuery 0.9.3 (with MonetDB 4.9.3), since "xquery()" now returns the result as a string. To get a better readable output, please use ".printf()" instead of ".print()".
In the released version of MonetDB/XQuery (0.8.0 & 0.8.2), the ".print()" is not required, as "xquery()" prints the result to stdout.
Stefan