Just a quick and short answer - There are several ways to unload as XML - among others
It's well documented in the SA 10 docs: SQL Anywhere® Server - SQL Usage > Using XML in the Database One easy way to select a whole table might be to use
answered 27 Nov '09, 15:22 Volker Barth |
If you want elements rather than attributes then try:
answered 30 Nov '09, 19:09 Justin Willey |
I took a short look at the OUTPUT TO ... FORMAT XML clause. I didn't fund the generated xml very useful. For example, if i have a Categories table with this structure:
I was expecting something like
The xml generated does look complicated:
Anyways, thanks. I'll dig a bit deeper. answered 30 Nov '09, 09:52 Sergio 1
Sergio, then the suggestions with SELECT ... FOR XML AUTO, ELEMENTS should fit, as a quick test with "SELECT * FROM sysdomain FOR XML AUTO, elements;" shows. In order to get a root, you might have to use wrap your select in a SELECT XMLELEMENT( NAME root, (<yourselecthere> )); |