I have a feed with this structure:

<products>
<product>
<productID>WFFRG05</productID>
<name>Säfsen Vakantiepark</name>
<price currency="EUR">236.00</price>
<productURL>
http://www.dejongintra.nl/tradetracker/tt.aspx?tt=439_0_3750_&r=http%3A%2F%2Fwww.dejongintra.nl%2Fvakantie.aspx%3Freiscode%3DWFFRG05
</productURL>
<imageURL>
http://www.dejongintra.nl/cmsimages/accommodatie/ACFRESAF_safsen_vakantiepark_exterieur_vierkant.jpg
</imageURL>
<description>
<![CDATA[
Een ideaal vakantiepark met dagelijkse activiteiten.
]]>
</description>
<categories>
<category path="Ferryreizen">Ferryreizen</category>
<category path="Wintersport">Wintersport</category>
</categories>
<additional>
<field name="country">Zweden</field>
<field name="region">Fredriksberg/Safsen</field>
<field name="city">Fredriksberg</field>
<field name="top_100">yes</field>
<field name="accommodation">Appartement</field>
<field name="duration_minimum">10</field>
<field name="duration_maximum">10</field>
<field name="persons_minimum">1</field>
<field name="persons_maximum">6</field>
<field name="stars">3+</field>
<field name="transport">Ferryreizen</field>
<field name="image_1">
http://www.dejongintra.nl/cmsimages/accommodatie/ACFRESAF_safsen_vakantiepark_exterieur_web.jpg
</field>
<field name="image_2">
http://www.dejongintra.nl/cmsimages/accommodatie/ACFRESAF_safsen_vakantiepark_winterhuis_web.jpg
</field>
<field name="image_3">
http://www.dejongintra.nl/cmsimages/accommodatie/ACFRESAF_safsen_vakantiepark_skiles_web.jpg
</field>
<field name="image_4">
http://www.dejongintra.nl/cmsimages/accommodatie/ACFRESAF_safsen_vakantiepark_kinderen_in_de_sneeuw_web.jpg
</field>
</additional>
</product>
<product>
<productID>WFGEI06</productID>
<name>Geilo Appartementen</name>
<price currency="EUR">469.00</price>
<productURL>
http://www.dejongintra.nl/tradetracker/tt.aspx?tt=439_0_3750_&r=http%3A%2F%2Fwww.dejongintra.nl%2Fvakantie.aspx%3Freiscode%3DWFGEI06
</productURL>
<imageURL>
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_exterieur_vierkant.jpg
</imageURL>
<description>
<![CDATA[
Goede appartementen met een uitstekende prijs-kwaliteit verhouding. Vriendelijke personeel zorgt voor een ontspannen vakantie.
]]>
</description>
<categories>
<category path="Ferryreizen">Ferryreizen</category>
<category path="Wintersport">Wintersport</category>
</categories>
<additional>
<field name="country">Noorwegen</field>
<field name="region">Geilo</field>
<field name="city">Geilo</field>
<field name="top_100">yes</field>
<field name="accommodation">Appartement</field>
<field name="duration_minimum">10</field>
<field name="duration_maximum">10</field>
<field name="persons_minimum">1</field>
<field name="persons_maximum">4</field>
<field name="stars">3</field>
<field name="transport">Ferryreizen</field>
<field name="image_1">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_exterieur_web.jpg
</field>
<field name="image_2">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_interieur_web.jpg
</field>
<field name="image_3">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_keuken_web.jpg
</field>
<field name="image_4">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_zwembad_web.jpg
</field>
<field name="image_5">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_apres_ski_web.jpg
</field>
<field name="image_6">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_arreslee_web.jpg
</field>
<field name="image_7">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_familie_in_de_sneeuw_web.jpg
</field>
<field name="image_8">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_huskysafari_web.jpg
</field>
<field name="image_9">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_kinderopvang_web.jpg
</field>
<field name="image_10">
http://www.dejongintra.nl/cmsimages/accommodatie/ACGEIGEA_geilo_appartementen_snowboarder_web.jpg
</field>
</additional>
</product></products>

For the regular fields I can use for example: productID, ImageURL and so on. But I also need to parse the various imagefields which are named: where x stands for the image number. But when I put as option for these fields: //*[@name="image_x"] I get every image in the feed with that number, but I only need 1 per node, just as the other normale fields. How do I limit every result per field to 1 per node? Because I now get every node to parse all the image from the feed. The correct structure is a bit hard.

Hope you guys understand.

Comments

twistor’s picture

Status: Active » Closed (fixed)

Closing out old issues. If you're still having this problem, feel free to re-open it.