By palabat on
I'm just wondering if somebody has done something similar to what I hope to achieve.
As a background, I am getting a big XML document and
I wanted to split this document into multiple mini-XMLs.
How can I programmatically create nodes for each mini-XML block and
save them into the db?
Thanks..
Pol
Comments
import XHTML
import_html works directly on XHTML under the hood, and is also happy to accept other dialects of valid XML as source data. (must be VALID or it guesses it's been fed bad HTML and tries to 'tidy' it)
You do however have to supply an XSL transformation that you can run on your input that will produce a new XML file containing your new nodes that looks something like:
A starting point is at http://drupal.org/node/138174#comment-233675
CCK content types are mostly supported also - just markup elements in your body with semantic IDs.
Mucho metadata can also be added to the header of the nested doc as you feel like, using META elements Taxonomy tags and anything to over-ride the Drupal node values..
You need some XSL-fu however.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards