Hi! This module is definitely suited to my needs. Currently using it to import data from one system to another using XML. However I ran into a problem and I'm not sure how to solve it. I want to import data from an XML file that has the following structure:

<article id="1848">
  <language>nl</language>
  <category>Distribution</category>
  <keywords>Apple, Banana, Citrus</keywords>
  <question>Derp 'n Herp</question>
  <answer>This is the body of the text</answer>
  <author>Middy Mudskipper</author>
  <data>2013-07-05 15:46</data>
</article>

I have a content type in my Drupal installation that accepts multiple term values for a vocabulary called "Tags". I'm thinking I should somehow put all the comma seperated keywords into an array and then add all terms to Drupal if they don't exist yet. How do I configure Feed Import so that I can import all keywords from the XML node as different terms for Tags?

Edit 1: managed to find a solution putting all keywords in an array and submitting it to my vocabulary. Now all that's left is to connect my content to these terms.

The way I did this is with the ::split function with the variables [field] and , .

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xzabre’s picture

Still struggling with this issue. Don't see what I'm doing wrong here. It's a taxonomy vocabulary without hierarchy so I think I'm overlooking something obvious.

On a sidenote: Trying to tag the imported nodes with projects from a nested vocabulary. No problem if I have to do this manually sinds there aren't many projects. So how would I need to use the textfield to add these terms to my content? I've tried comma seperated values but to no avail.

xzabre’s picture

Added two attachments with the configuration I'm using to try and add the terms to my node.. Anything I'm doing wrong here?

Sorin Sarca’s picture

::getTaxonomyIdByName will only return ids for existing terms. If you want to also save the new terms you should use ::setTaxonomyTerms.
Filters documentation can be found here https://drupal.org/node/1363028

Sorin Sarca’s picture

Issue summary: View changes

Added Edit 1

Sorin Sarca’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)