Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

enter image description hereI can't seem to find a good module that does what my title says. Xpath XML Parser is limited to a single source isn't it?

I needed to be able to import xml feeds from different URLs towards the same target (e.g. mapped to a specific content type). Say, my website will publish contents from different client's websites using an xml specification defined by me. My website then will get all contents by importing all those xml sources towards the same content type so my site will list all contents from different 'sources' effectively. Say real estate listings coming from different real estate agencies/agents...

Has anyone done this before?

share|improve this question

1 Answer

To me this seems like an exact use case for Feeds plus Feeds XPath Parser. It will be possible to map your custom XML spec to various fields and import content from as many sources as you want into nodes of the same content type. I posted an answer to another question which may give guidance on how to use it.

share|improve this answer
I have one question though.. Why is the url path to import located within the add new content as shown on the image I attached? Isn't this set up redundant? I mean the reason why I need the importer is to auto-import the content and map the xml fields to, say, 'commercial for rent' content-type as above.. Every submission of the content of this type would trigger importing, as opposed to setting up a cron to 'independently' import xml without having to manually add the new content of this type... – jan Jul 30 '11 at 18:26
I see what you are saying. An important concept of Feeds is that it will require two content types, one being the "feed", or the path to the data you are importing, and the other being the target, or the "Commercial for Rent" in your case. There is a good tutorial at yadadrop.com/drupal-video/…. – Chris Pliakas Jul 30 '11 at 21:40
sorry, but everything seems to be only using a single source. I have no clue as to how to make the xpath parser/feed to accept multiple url sources into one content type... – jan Jul 31 '11 at 11:02
I think I found a way.. Thank you Chris! I will update this post once I found it to be a real solution to my problem. Thank you again. – jan Jul 31 '11 at 12:02
@jan this is precisely what I was looking for, was about to post a separate question. Can you perhaps explain conceptually what your solution was? Thanks – Duncanmoo Jul 15 '12 at 21:03
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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