2
votes

How can I read a non-XML (specifically CSV) file that is stored in a BaseX database from a query? csv:doc() expects a URI, how do I point it to a file inside the database?

1

1 Answers

1
votes

Ooh, I think I got it:

csv:parse(convert:binary-to-string(db:retrieve("db", "path/to/file.csv"), 'UTF-8')

Or is there an easier way?