0

I'm using drupal 7 with feeds module.

I've followed this tutorial to try to create nodes with the feed but it didn't work.

Here is the feed : https://cb1-demo-fr-staffing.luceosolutions.com/openrest/requisitions/active Does anyone know why ? enter image description here

enter image description here

enter image description here

7
  • 1
    Too vague, you need to provide more information. Maybe some screen shots of your Feeds settings? Lets see what your mapping looks like
    – DMAC
    Commented Jul 6, 2017 at 16:19
  • 1
    You do not have xpath parser inside your mapping. Flush all caches then go back to your parser settings and click xpath XML parser. Inside your mapping your source should be xpathparser:0 and then you can map it to what field it should go to. Then when you go to /import there should be a dropdown called XPATH PARSER SETTINGS click on that, then for the context put //requisition as your context. Then mapp the XML field in the XML file to said field. Example: title = job_id, and Body = rendered_job_posting
    – DMAC
    Commented Jul 6, 2017 at 17:30
  • 1
    As long as you follow the tutorial it should get you 90% of the way there. The Xpathparser is a little confusing at first, but basically in your mapping map all the xpathparser values to your values within your Content type your importing too. Then on /import it should be where you assign your XML field values from the feed to said Xpathparser values, AKA your CT fields. I can't post an answer or I would provide screenshots
    – DMAC
    Commented Jul 6, 2017 at 17:31
  • 1
    Glad to hear it. I can't answer the question because the question was put on hold as it was flagged too broad by @Clive. No biggie :P
    – DMAC
    Commented Jul 6, 2017 at 21:44
  • 1
    @DMAC Go for it :)
    – Clive
    Commented Jul 6, 2017 at 21:54

1 Answer 1

2

You do not have xpath parser inside your mapping, which is required for the XML feed you are using, as it is in XML format.

The Xpathparser is a little confusing at first, but basically in your mapping, map all the XPath parser values to your values within your Content type you're importing too. Then on /import it should be where you assign your XML field values from the feed to said Xpathparser values, AKA your CT fields.

Flush all caches then go back to your parser settings and click XPath XML parser.

enter image description here

Inside your mapping your source should be xpathparser:0 and then you can map it to what field it should go to from your associated CT(set in Node processor settings). Do this for ever field from your CT which you want a value coming into.

enter image description here

Then when you go to /import there should be a dropdown called XPATH PARSER SETTINGS click on that. there will be a context field, give the context field the value of //requisition. (Optionally you can set this up on the Feeds settings under the Xpath XML parser Settings IF you have already set up your mapping)

enter image description here

The context is where you want the feeds importer to start importing tag data from. You want the context to be //requisition so you can grab the tag values from within it. (example job_id). Then map the XML field in the XML file to said field.

Example: title = job_id, and Body = rendered_job_posting.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.