I'm trying to automatically generate Drupal nodes from a XML file. I am trying to achieve this using the Feeds module and the Feeds XPath Parser. For now I just want to transform the XML elements as they are. My problem is that the correct values are assigned to the generated nodes but they contain the the whole XML element instead of the content. This is a simplified XML file for my case:
<Kinos>
<Kino>
<kinoid>75102</kinoid>
<kinoname>Name des Kinos</kinoname>
<adressid>75101</adressid>
<leinwaende>8</leinwaende>
<sitzplaetze>1000</sitzplaetze>
<servicekino>0</servicekino>
<tonsystem>DTS, Dolby Surround</tonsystem>
<beschreibung>Das Kino am Mauerpark.</beschreibung>
</Kino>
</Kinos>
and the debug output after the import looks like this:
context :
<Kino> <kinoid>75102</kinoid> <kinoname>Name des Kinos</kinoname> <adressid>75101</adressid> <leinwaende>8</leinwaende> <sitzplaetze>1000</sitzplaetze> <servicekino>0</servicekino> <tonsystem>DTS, Dolby Surround</tonsystem> <beschreibung>Das Kino am Mauerpark.</beschreibung> </Kino>
xpathparser:0 :
<kinoid>75102</kinoid>
xpathparser:1 :
<kinoname>Name des Kinos</kinoname>
xpathparser:2 :
<adressid>75101</adressid>
xpathparser:3 :
<leinwaende>8</leinwaende>
xpathparser:4 :
<sitzplaetze>1000</sitzplaetze>
xpathparser:5 :
<servicekino>0</servicekino>
xpathparser:6 :
<tonsystem>DTS, Dolby Surround</tonsystem>
xpathparser:7 :
<beschreibung>Das Kino am Mauerpark.</beschreibung>
Created 1 node.
As you can see the xpathparser mappings correspond to the fields that I have assigned, but the tags are also contained (it doesn't matter if the field type is simply Text or Integer).
I'm using the latest feeds_xpathparser module release version (7.x-1.0-beta4). When creating the custom importer I followed the steps mentioned here.
Basically I've created two equal content types. One for the Feed Processor and one for the creation. Then I've setup the xpathparser mappings for each field like this:
xpathparser:0 => nodeid
xpathparser:1 => kinoname
xpathparser:2 => addressid
...
and finally set the XPath queries to something like this:
Context: //Kino
nid: kinoid
field_name: kinoname
field_adressid: addressid
....
I hope someone can help me with this :) Best regards, Satara
