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 , .
Comment | File | Size | Author |
---|---|---|---|
#2 | feed_import_project_field.JPG | 34.61 KB | xzabre |
#2 | feed_import_project_field_filter.JPG | 33.47 KB | xzabre |
Comments
Comment #1
xzabre CreditAttribution: xzabre commentedStill 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.
Comment #2
xzabre CreditAttribution: xzabre commentedAdded two attachments with the configuration I'm using to try and add the terms to my node.. Anything I'm doing wrong here?
Comment #3
Sorin Sarca CreditAttribution: Sorin Sarca commented::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
Comment #3.0
Sorin Sarca CreditAttribution: Sorin Sarca commentedAdded Edit 1
Comment #4
Sorin Sarca CreditAttribution: Sorin Sarca commented