Active
Project:
Transformations
Version:
6.x-1.0-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Jul 2010 at 19:43 UTC
Updated:
8 Jul 2010 at 13:41 UTC
First of all: Awesome module! This module is exactly what I was looking for.
I have only 2 issues/questions
I want to import an XML file every day using Transformations. The problem is that the values are incremental... Hmmm lets see if I can explain myself better.
Monday XML
<?xml version="1.0" encoding="UTF-8"?>
<courses>
<course units="12" unit-length="1.0" max-attendants="20">
<name>Taekwondo</name>
<instructor>Master Park</instructor>
<instructor>Louise Yi</instructor>
<instructor>George Wright</instructor>
</course>
</courses>
Thursday XML
<?xml version="1.0" encoding="UTF-8"?>
<courses>
<course units="12" unit-length="1.0" max-attendants="20">
<name>Taekwondo</name>
<instructor>Master Park</instructor>
<instructor>Louise Yi</instructor>
<instructor>George Wright</instructor>
</course>
<course units="24" unit-length="1" max-attendants="25">
<name>Karate</name>
<instructor>Mr. Miyagi</instructor>
<instructor>Mike Fenton</instructor>
</course>
<course units="256" unit-length="8" max-attendants="1">
<name>Kung Fu</name>
<instructor>Pai Mei</instructor>
<instructor>Genevieve Mak</instructor>
</course>
</courses>
Thursday I have new values PLUS the monday values...
How can I avoid to import the already imported data?
Also.... It is possible to execute a pipe using Drupal cron.php or through a module like Rules or something?
Comments
Comment #1
Edward C. Zimmermann commentedEasy. Just do a diff (of the DOM) of the two. There are a number of tools including so-called XML diffs that can do this.
On the other hand... Is the XML file (which I imagine is exported from some Db) just growing or are items not changing? If changing then the easiest is to sync view it as a Db dump and sync at the specified times..
--- we do this kind of thing all the time.. but just import directly in the Db (Postgres, MySQL, Oracle ) and don't do anything with Drupal or other applications that use the Db..
Comment #2
avantwaves commentedThank you! I will take a look to your approach.