|
top
|
Subject: Save results of XQuery as CSV? Author: Tony Lavinio Date: 03 Oct 2006 11:03 AM
|
I think you need one more level of element in your output.
In order to write through the CSV adapter, you need a root
element, and then a row element, and then column elements.
I tried a simple XQuery program that consisted of just this:
<CompanyMetadata><Col1>44,093,500</Col1><Col2>11.75</Col2></CompanyMetadata>
and I got just a CR/LF in my output file. The reason? No
root element - Stylus Studio just saw CompanyMetadata as the
root, and Col1 and Col2 as row names.
If I change it to
<CompanyMetadata><Row><Col1>44,093,500</Col1><Col2>11.75</Col2></Row></CompanyMetadata>
then I get
"44,093,500",11.75
as my output.
Here is the output URL I used:
adapter:CSV?file:///c:/temp/lundin.txt
Does this help?
|
|
|