Dear Noam,
Welcome to the list. I guess the answer on your question mainly depends on what you have done so far, so feel free to give us some more information (e.g. the XQuery expression you wrote).
The following XQuery expression reads two XML documents, navigates to a certain path, serializes the resulting nodes as CSV and writes the result to a file:
for $doc in ('one.xml', 'two.xml') let $result := doc($doc)/any/path let $csv := csv:serialize($result) return file:write-text($doc || '.csv', $csv)
All the best, Christian (Grün)
On Tue, May 26, 2015 at 8:59 PM, Noam Green green.noam@gmail.com wrote:
Hi,
I'm new to BaseX, so apologize if this is a repetitive question. I have created an XQuery which currently runs on a specific XML file. What I'd like to do is to be able to create a batch command, which would receive as input a different XML source file, run the XQuery command, and save the results in a CSV file.
Is there a way to do such a process?
Thanks, Noam