XML import fails with single record

A place for users and developers of the Xataface to discuss and receive support.

XML import fails with single record

Postby nusskratzer » Sat Aug 18, 2012 1:27 pm

I am trying to import a set of records written in an XML file to the table "mytable". I added following method in the delegate class for "mytable":

Code: Select all
function __import__xml(&$data, $defaultValues=array()){
$datafilter = new Dataface_ImportFilter_xml();
$records = $datafilter->import(&$data);
return $records;

This does work with XML files containing at least 2 records, but fails when the XML file contains a single record (same result when copy&pasting the xml data into the textarea of the "import records" page instead of uploading an XML file).

It fails because I get the message "Found 12 records to import", where 12 is actually the number of different fields in one record. If I preview the result, it shows a list of 12 empty records, and if I proceed to insert I obtain the message "Records imported successfully", but nothing actually happened (same number of records in the database than before).

Please could you help me solving this issue?
Posts: 4
Joined: Tue Aug 14, 2012 1:34 pm

Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 4 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved