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
Hi </greet> 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 -- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |