Is there anyone who can help me with the following issue?
I have the following xml from an external site, i cannot modify this.

<?xml version="1.0" encoding="ISO-8859-1"?>

10138124-9-201021:1512
KING SOFTWARE/VCN 2WHV 1
1013942-10-201015:0082
WHV 1SPIVO 2
10149511-12-201015:0082
WHV 1PHOENIX 1
10150118-12-201016:0082
WHV 1DVO 1
10102415-1-201116:0082
WHV 1SCHOVOCOMCA 1

I need to store all rows as seperate items, i used //wedstrijden//poule//row as xpath and mapped all content (wednr, datum, tijd, zaal, thuis and uit) to cck fields. This works fine, but i also need to store the value of the attribute 'id' in a cck field. I dont know how to do this obviously if i use //wedstrijden//poule as xpath it wil store all rows as one item and i need seperate.
Any ideas?

Comments

realnerd’s picture

I think this will make things a lot clearer to understand ;-)

<?xml version="1.0" encoding="ISO-8859-1"?>
<wedstrijden>

<poule id="HPA" name="HEREN PROMOTIEKLASSE A">
<row><wednr>101381</wednr><datum>24-9-2010</datum><tijd>21:15</tijd><zaal>12</zaal><thuis>KING SOFTWARE/VCN 2</thuis><uit>WHV 1</uit></row>
<row><wednr>101394</wednr><datum>2-10-2010</datum><tijd>15:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>SPIVO 2</uit></row>

<row><wednr>101404</wednr><datum>9-10-2010</datum><tijd>15:00</tijd><zaal>88</zaal><thuis>VOY 1</thuis><uit>WHV 1</uit></row>
<row><wednr>101414</wednr><datum>16-10-2010</datum><tijd>15:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>ALFA/NEXT VOLLEY D 3</uit></row>
<row><wednr>101433</wednr><datum>30-10-2010</datum><tijd>17:00</tijd><zaal>75</zaal><thuis>RVC/LIBANON'50 2</thuis><uit>WHV 1</uit></row>

<row><wednr>101456</wednr><datum>13-11-2010</datum><tijd>14:15</tijd><zaal>34</zaal><thuis>CITY BRIL KRIMPEN 3</thuis><uit>WHV 1</uit></row>
<row><wednr>101464</wednr><datum>20-11-2010</datum><tijd>15:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>DE BURGST 2</uit></row>
<row><wednr>101482</wednr><datum>3-12-2010</datum><tijd>21:15</tijd><zaal>22</zaal><thuis>FORANTO 1</thuis><uit>WHV 1</uit></row>

<row><wednr>101495</wednr><datum>11-12-2010</datum><tijd>15:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>PHOENIX 1</uit></row>
<row><wednr>101501</wednr><datum>18-12-2010</datum><tijd>16:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>DVO 1</uit></row>
<row><wednr>101024</wednr><datum>15-1-2011</datum><tijd>16:00</tijd><zaal>82</zaal><thuis>WHV 1</thuis><uit>SCHOVOCOMCA 1</uit></row>

</poule>
</wedstrijden>
homoludens’s picture

You can get attribute value like this:

//wedstrijden//poule/@id

But I'm not sure if you can save it as separate cck field for every node.
Try and report back.

chrisirhc’s picture

Right now, this isn't possible in this module. All the data that you want to map must be within each row element match, it cannot be in the parent of the row (like the example in this case).

You might want to take a look at http://drupal.org/project/feeds_xpathparser and see if they support this functionality.