Importing information from XML to omeka

Hi,
I have a site which is built on asp and a windows machine, the information is in an XML file which stores all the information such as language, country and so on.
Not all of the information is there on omeka and some of the information I can put in omeka is not there.
Is there a way to import the information from the XML file (including links to other sites and files which I can provide links to) to omeka?

Depending on the structure of the XML, I imagine that the easiest thing would be to convert it to CSV and use the CSV Import plugin

Hi,

Yes, you can use the XmlImport plugin with a fork of CsvImport.

With that, you just need to create a xslt sheet that transforms your xml to a flat csv.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge Management

Daniel, thanks for the advice but it doesn't work for me, if you want I can re-try it and bring the error if there is one.

I tried the csvimport and it worked partially, it stopped with an error or just stopped after a while. I wanted to try things to make it better but one time it just kept saying it's working even after I restarted the computer (that's not on production of course). So I tried to uninstall the csvimport plugin and install it back...
the strange part is that now I get the following error (didn't have this before):

Omeka_File_Ingest_Exception

Could not transfer the file from "http://jic.tau.ac.il/moreshet/_repositoryTL15/1100618.jpg" to "/tmp/b233dea776a81f7ce0d412c2659b6e50.jpg": Unable to Connect to tcp://jic.tau.ac.il:80. Error #0: php_network_getaddresses: getaddrinfo failed: Name or service not known

#0 /var/www/html/omeka/application/libraries/Omeka/File/Ingest/Source.php(128): Omeka_File_Ingest_Url->_transfer('http://jic.tau....', '/tmp/b233dea776...', Array)
#1 /var/www/html/omeka/application/libraries/Omeka/File/Ingest/Abstract.php(176): Omeka_File_Ingest_Source->_transferFile(Array, 'http://jic.tau....')
#2 /var/www/html/omeka/application/models/ItemBuilder.php(209): Omeka_File_Ingest_Abstract->ingest('http://jic.tau....')
#3 /var/www/html/omeka/application/libraries/globals.php(505): ItemBuilder->addFiles('Url', 'http://jic.tau....', Array)
#4 /var/www/html/omeka/plugins/CsvImport/models/CsvImport/Import.php(366): insert_files_for_item(Object(Item), 'Url', 'http://jic.tau....', Array)
#5 /var/www/html/omeka/plugins/CsvImport/models/CsvImport/Import.php(261): CsvImport_Import->_addItemFromRow(Array, Array, Object(CsvImport_ColumnMap_Set))
#6 /var/www/html/omeka/plugins/CsvImport/models/CsvImport/Import.php(203): CsvImport_Import->_importLoop(0)
#7 [internal function]: CsvImport_Import->start()
#8 /var/www/html/omeka/plugins/CsvImport/models/CsvImport/ImportTask.php(22): call_user_func(Array)
#9 /var/www/html/omeka/application/libraries/Omeka/Job/Dispatcher/Adapter/Synchronous.php(25): CsvImport_ImportTask->perform()
#10 /var/www/html/omeka/application/libraries/Omeka/Job/Dispatcher/Default.php(95): Omeka_Job_Dispatcher_Adapter_Synchronous->send('{"className":"C...', Array)
#11 /var/www/html/omeka/plugins/CsvImport/controllers/IndexController.php(138): Omeka_Job_Dispatcher_Default->send('CsvImport_Impor...', Array)
#12 /var/www/html/omeka/application/libraries/Zend/Controller/Action.php(516): CsvImport_IndexController->mapColumnsAction()
#13 /var/www/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('mapColumnsActio...')
#14 /var/www/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /var/www/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#16 /var/www/html/omeka/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#17 /var/www/html/omeka/application/libraries/Omeka/Core.php(165): Zend_Application->run()
#18 /var/www/html/omeka/admin/index.php(44): Omeka_Core->run()
#19 {main}

I would like to understand how to solve it but also to understand what is going on. It worked before

Thanks, Moshe

Hi,

To avoid overload and size limits of the server, CsvImport creates tasks that are launched in background. So it doesn't care if the server is restarted or not, because task are in database.

Most probably you changed manually a parameter on your server in your previous session that are not changed in your new one. Currently, in your new session, your server can't access jic.tau.ac.il:80 any more.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

OK, I guess the problem was because of something on my side because after I started the MYSQL and reloaded it and then it worked (at least on a short list of 300 rows, I will check it with the full one soon).
Thus, now I have another question, some of the rows were skipped, How do I know which are the skipped items? What is the meaning of item here (is it a row? the link?)?

With CsvImport plugin, you can't know which lines are skipped.

Each row represents an item. A skipped item means that the line is badly formatted, most often because there are quotes, double quotes, commas and line breaks in your datas. So you need to expurge them before import and use a good delimiter and an enclosure adapted to your data. For my part, I often use a tabulation, because this is never used in my data.

Next release of XmlImport (for Omeka 2) will import xml data directly in database without use of csv to avoid these issues.

Sincerely,