Closed (fixed)
Project:
Feeds XPath Parser
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 May 2012 at 21:32 UTC
Updated:
22 May 2012 at 07:00 UTC
Hello,
I have a xml file that I need to parse. At the moment, I have some problems with it. Perhaps someone can help me out...
The XML file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Tours>
<Tour ID="111">
<Title>...</Title>
<Description>...</Description>
<Events>
<Event ID="1111">
<Date>2012-08-12</Date>
<Location>Miami</Location>
</Event>
<Event ID="1112">
<Date>2012-08-14</Date>
<Location>New York</Location>
</Event>
<Event ID="1113">
<Date>2012-08-15</Date>
<Location>Chicago</Location>
</Event>
</Events>
</Tour>
<Tour ID="112">
<Title>...</Title>
<Description>...</Description>
<Events>
<Event ID="1121">
<Date>2012-07-12</Date>
<Location>Denver</Location>
</Event>
<Event ID="1122">
<Date>2012-07-14</Date>
<Location>San Diego</Location>
</Event>
</Events>
</Tour>
</Tours>
</xml>
Every single Event should become one node (with Date, Location and the tour-shared title and description).
At the moment I can only import one Event (Date/Location) per Tour, but not all of them.
I use the following settings for the xpath parser:
Context: /Tours/Tour
title: Title
body: Description
guid: Events/Event/@id
date: Events/Event/Date
location: Events/Event/Location
Has someone an idea how I can export all events (all events for every tour)?
Comments
Comment #1
d.holmen@gmail.com commentedSame thing here.
Comment #2
MJH commentedTry the following:
Context: /Tours/Tour/Events/Event
title: ../../Title
body: ../../Description
guid: @ID
date: Date
location: Location
Comment #3
twistor commented@MJH has it.
Consider adding this to the docs.