This is something I have had no experience with whatsoever, so I am hoping that someone can tell me whether it is possible or not.

I have a site up and running, and I am looking at starting a section for people to find holiday properties.

The information of these properties can be accessed via an XML feed of the details and a separate csv of the prices and photos.

The data is presented like so in the XML..

<tcreated>2013-04-09 22:30:26</tcreated>
<cpropname>Brazengate Family Cottage, Long Ashes, Threshfield, Yorkshire Dales (Ref 55)</cpropname>
<carea>Yorkshire Dales</carea>
<csubarea>Yorkshire Dales - Wharfedale</csubarea>
<cvillagename>LONG ASHES, THRESHFIELD</cvillagename>
<cpriceinfo>All prices are inclusive of the booking fee.&lt;BR&gt;&lt;BR&gt;Winter Short Breaks (WSB) are available at many properties in the "Winter" period - subject to availability. Extra nights are charged pro rata of the weekly rental.&lt;BR&gt;&lt;BR&gt;Off Season Breaks (OSB) are available at many properties in parts of the "Low" and "Mid" periods - subject to availability. The price for a 3 night break is either 75% of the normal weekly rental or, if it is higher, the quoted Winter Short Break price. Extra nights are charged pro rata of the weekly rental. OSBs can be booked within a calendar month of the start date of the holiday.&lt;BR&gt;&lt;BR&gt;"Last Minute Breaks" (LMB) are available at most properties throughout the "LOW", "MID", "HIGH", "PEAK", "XMAS" and "NEW YEAR" periods. The price for a 3 night break is either 65% of the normal weekly rental or, if it is higher, the quoted Winter Short Break price. Extra nights are charged pro rata of the weekly rental. LMBs can be booked within one week of the start date of the holiday. </cpriceinfo>
<cproppostcode>BD23 5PN</cproppostcode>

Now I've seen that there is an add-on called Datagrab, and I am assuming this will be handle this kind of import?

I can see how I can map most of those fields, so that shouldn't be a problem. Where I am a bit unsure is that the images for each entry are stored as urls in a separate csv feed that looks like this...


Now will it be possible to pull those images in the entries that are created via the initial XML import? It would need to match the "nid" custom field (I create) to hold the "nid" value from the XML and match it with the "nid" in the csv image import. Also it would need to order them as per the nPosition value.

I'm hoping this is possible, because there's around 2000 entries that need to be created, and I really do not fancy doing so by hand!


1 Answer 1


Yes, you just run your initial import to get your properties entries into the system, storing the nid as a custom field.

Then run a second import with the option to update existing entries using nid to map the image data to the correct existing entry.

Datagrab will work and is a great add-on. Solspace Importer is also very nice.

  • That sounds good. Just been reading the docs some more and have come across the recommendation to specify a unique id in a custom field. Luckily as both set of data contain the same unique id, this should be achievable. I also have a requirement where I only need certain entries to be imported. E.g. ones where the value of <lsmoking>0</lsmoking> equals 1. But I'm not sure that is do-able?
    – shorn
    Apr 10, 2013 at 19:32
  • I'm not immediately seeing an option in either Datagrab or Importer to skip records based on the content of a field but that doesn't mean there isn't a way. An alternative approach would be to groom your import source (the CSV) prior to import.
    – Alex Kendrick
    Apr 10, 2013 at 19:59
  • Thats true, although the main bulk of the data comes from the XML, and I'm not sure how to edit that XML to delete an entry based on a field? Will have to think of the best way to do it! Theres about 4000 entries in total and I only require half, so seems a bit redundant to import everything!
    – shorn
    Apr 10, 2013 at 20:09

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.