i just tried and it worked for me, lets see an example:
enter in command bar: create db test
go to Add documents and add a XML file
enter in command bar: set parser csv
go to Add documents and add a CSV file
Thats it.
We will consider adding a parser combo box to the Add documents
menu.
I hope this helps,
Kind regards,
Andreas
Am 18.01.11 14:14, schrieb Jan Vlčinský (CAD):
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
create database using XML data
add more documents, if needed, use CSV format (so parser
shall be changed)
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.
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"
Adding document by Database - Add documents
results in the same message
Trying to SET PARSER CSV
did not change anything
Trying to add header with field names into
imported file does not help