Re: [basex-talk] CSV : Content is not allowed in prolog.

2014-08-09 Thread Roman Mishin
> fn:doc("db/path/to/doc.xml") ... path/to/docs in the database db answered my own question. Sorry. This does what I inted: doc("IntersectPhoneNumbers/Data/rent_flats.csv") instead of doc("Data/rent_flats.csv") -- Kind regards, Roman

Re: [basex-talk] CSV : Content is not allowed in prolog.

2014-08-09 Thread Roman Mishin
Thank you Dirk. I am new to XQuery and actually learning it along with BaseX. Yes I created a database solely for the purpose of reading CSV files (there is only 3 of them). I added these files to the database using CSV parse via GUI. The files are represented in GUI as XML-like structures. I unde

Re: [basex-talk] CSV : Content is not allowed in prolog.

2014-08-08 Thread Dirk Kirsten
Hello Roman, So I guess your input file is a CSV, isn't it? I would also guess you added the CSV file to the database using the CSV parse. That's when internally the same thing happened as when using csv:parse() in your second example. As CSV is not a valid XML dialect we use a conversion to tran

[basex-talk] CSV : Content is not allowed in prolog.

2014-08-08 Thread Roman Mishin
Hi, Could you, please, tell what can be wrong here. This query works: db:open("IntersectPhoneNumbers","Data/rent_flats.csv")/csv/record/UserPhone With result: 2218520 2219391 2348039 ... I can access the file directly from the query, without adding it into a database. This also does work, gi