Hi Andreas Yes, creation of new database from CSV files works perfectly - I overlooked the Parsing tab.
However - is there some easy way to mix imported formats in one database?
I would think of scenario like
1. create database using XML data 2. add more documents, if needed, use CSV format (so parser shall be changed) 3. later add other XML (parser shall be probably changed back)
Menu command "Database - Add documents" does not offer an option to change parser. I tested new database based on CSV parser and later added XML document. XML document was parsed using CSV parser, what was not what I needed (but was quite logical). Of course I can use workaround to import CSV always into separate database and then either query with explicit database name for CSV data, or export imported CSV as XML and import into main "XML parser based" database.
Is there any way to switch parser in existing database?
Jan
PS: Be sure, that availability of any CSV import (the same will apply to text and html) is great service as is.
2011/1/18 Andreas Weiler andreas.weiler@uni-konstanz.de
Hi Jan,
i just tried it and it worked for me. I did use the GUI and changed in the parsing tab to csv. My csv has no header and i used semicolons.
Kind regards, Andreas
Am 18.01.11 11:57, schrieb Jan Vlčinský (CAD):
Hi *BaseX 6.5 incl. rewritten web site is impressive*. Really.
I go through it feature by feature and test it. Trying to import CSV file I have a problem
- Creation of new database from xsv file or directory does not work
(using default options, no changes) Reports "Line 1: Content is not allowed in prolog" 2. Adding document by Database - Add documents results in the same message 3. Trying to SET PARSER CSV did not change anything 4. Trying to add header with field names into imported file does not help
Questions
- How to import CSV fle
- What CSV format is expected
- tab, coma, semicolon?
- header with field name allowed/expected?
With best regards
Jan
BaseX-Talk mailing listBaseX-Talk@mailman.uni-konstanz.dehttps://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
--
Andreas Weiler Database & Information Systems Group, U Konstanz Room E 209, 0049 7531 88 4449 (phone) 3577 (fax) University of Konstanz