Path

ez projects / import_xml_data


Import XML Data

UNIX name Owner Status Version Compatible with
import_xml_data Olivier Pierret stable 1.4.2 3.5 - 3.6 - 3.7

This module extension allows the user to load an xml file containing
values for a serie of objects in the system. For each object
described in the xml files an EZ content object is created and
published in EZ Publish. User objects can be created as well.
This module works for any object containing text type data fields.

It allows the developer to select the content class and the node where
the new objects will be created through ini settings. The list of
updated fields in the newly created objects is configurable in the
ini file as well.

The module includes a sample form where the user can upload the xml data
as an external file. This form can be accessed at
/importXMLData/form
The module includes also an option that allow the user to remove
(without any security checkings...) the content of the target node
before inserting the new objects. Removed items can optionaly be kept
in the trash.
sample ini file :
[ImportParams_for_data_class_1]: according to the datatype of uploaded data the system will look in
different section of the ini file. The current sample ini file is
configured for the datatype "class_1" (these values are to be set in
the form.tpl form template): class identifier of the content class to
be created: id of the node where the objects should be updated:
element tag that contains the object list in xml: element tag that
contains an object in xml: list of field names in xml (xml field tag
must have the same name as the object class attribute. Field names
"account-login", "account-password" and "account-email" are reserved
names for importing ezUser details. The name of the user type field
in the eZ publish class must be "user_account".: this module links
the PHPXPath PHP library (
- ezinteger, ezstring, eztext, ezemail, ezisbn, ezprice, ezfloat,
ezboolean, ezdate, ezdatetime, ezurl:
- UTF-8 is not supported out of the box.
If you want to import UTF-8 xml files, add UTF-8 argument to
xml_parser_create function in line 1680 of XPatth.class.php file like
this:
- ezurl data type is only partially supported: the text of the link
cannot be set separately: it is set to the url value found in the xml
file
- when importing more than 50 users in one xml files, it seems that
*some* users may be duplicated - this problem triggers using Oracle
with ezpublish 3.6.0 (ezOracle extension 1.2) - any help regarding
this would be valuable...: v 1.4.2 has been recently modified so
status is set to beta - Should you face any issues, please use the
forum thread:

 

Screenshot

This project has no reviews yet. Be the first one to review it!

No forum messages yet.