Import date to Drupal I am receiving data from a third party company through XML.
I want to add this to my website as drupal nodes, having some information like title, body, summary, image,...

I am able to make a cron job that reads all the data from the XML &amp; write it to a database.

Now I was wondering:


Can I write this to the database directly without creating any inconsistenties?
What tables do I have to write this to? only the node table and the field_data tables? Or do I also have to add it to field_revision tables etc? Am I forgetting any others?
Is there a module that's doing this? I tried the Feeds &amp; the Migrate modules, but I can't seem to find anything to set up XML or SQL Data import on those. Either of the 2 is fine, whether it goes directly from the XML, or if I have to import it from SQL, cause then I can just add them to a temp table first.


Thank you very much
Can I write [the external data] to the database directly without creating any inconsistenties?


Hypothetically, yes. On a practical level, I'd avoid this approach like the plague. For example, in your next question, you ask…

What tables do I have to write this to? only the node table and the field_data tables? Or do I also have to add it to field_revision tables etc? Am I forgetting any others?


Thanks for the segue. Why not use Drupal's Feeds module to consume your data and let Drupal and Feeds manage the consumption process? This will ensure all the data modeling, processing, security and coding best practices inherited by the larger community. Why would you bypass all the work that's gone into this development?

Is there a module that's doing this? I tried the Feeds &amp; the Migrate modules, but I can't seem to find anything to set up XML or SQL Data import on those. Either of the 2 is fine, whether it goes directly from the XML, or if I have to import it from SQL, cause then I can just add them to a temp table first.


As ar7Max indicates, you can use the Feeds and Feeds XPath Parser. It's stable, mature and has a large user base. We rely on this combination heavily (50+ sites, 100's of specific feeds imports) mostly without a hitch. The hitch tends to be poorly formed XML output which can break an import — again, this is rare and addressable at the source OR using Feeds Tamper. where you can rewrite the XML data as needed. If you wish, ask your XPath Parser specific questions here — once you understand it, it's trivial to manage.