Hi,
I have a situation where it would be VERY helpful to create an automated process for creating nodes from XML files. The XML files already exist. Basically, I want to create a catalog of "metadata" about random datasets that exist at my organization. The problem is that some of the metadata is best represented by multigroups -- i.e., there is one bit of metadata called "process steps" that talk about what was done to the data when it was being processed and these steps vary by dataset, so for instance, one dataset could have three process steps while another might have one or two... or five. I've created a new content type and have represented the process steps with a a CCK 3 "multigroup", which allows me to add more "process step" fields as necessary if I'm manually entering data (i.e., it puts the "add another field" button in the process step area on the node/add form, so that the user can add as many steps as needed). Is there any way to automate/import some of the existing metadata? I've looked at the Feeds module as well as Views Data Export (just to see how it exports XML files), but haven't seen much in the way of importing and multigroups. Also, by the way, "Views Data Export" doesn't seem to know how to deal with multigroup fields.
Also, I'm running the latest version of Drupal 6, but, if there is a Drupal 7-only option that works well, I could upgrade to 7 for this project.
Thanks for any hints or tips! I've spent a lot of time researching this on my own.. and now it's time to ask for help because I'm not sure how to proceed!
Jonathan
Comments
creating nodes from XML? --- with CCK multigroup fields?
The feeds module with a module for processing XML should import the XML. The feeds module has three types of plugins. If it cannot handle multigroups out of the box, you can write your own plugin. This just involves copying one of the existing plugins in the feeds module and modifying it to handle your logic. Writing a plugin does involve some programming but it is not as complicated as you would expect once you know the process.
I'd definitely use the above.
I'd definitely use the above. Feeds in conjunction with xpath parser and feeds tamper can handle all types of xml, and automate node creation almost any way you like, with xml mapping to fields.