I'm trying to create nodes from an XML feed using Feeds XPath Parser.

Some of the data appears to import, but not all fields are being populated or populated correctly.

Here's a snippet of the feed:

<merchant id="2607" name="Business IT Online Office Shop">
<prod id="49194411">
Avery afterBURNER Label System Software with Applicator 10 Inserts Ref AB1800 [24 Labels]
Avery afterBURNER Label System Software with Applicator 10 Inserts Ref AB1800 [24 Labels].- Includes software, applicator, 24 labels and 10 inserts.- For Professional CD labels and inserts.- No Touch labels - unique design of the label sheets mean you can apply the label to the CD/DVD without touching the printed design or the adhesive.- 20 premium matt and 4 photo quality glossy labels.- The curved design of the applicator means the label is rolled smoothly onto the CD/DVD.- Inserts include a CD jewel case insert cover and tray (including spine) - allowing design and print in one effort.- The software contains over 2000 clip art images, 120 pre-formatted label designs and much more.
<price curr="GBP">
<mCat>Machines and supplies>Computer Software</mCat>

There are several more products in the document, structured in the same way.

In the feed importer, I've set the context as //merchantProductFeed/merchant/prod.

I have two fields to populate: 'title' (text) and 'cost' (decimal).

The XPath query I'm using for title is 'text/name' and the query for cost is 'price/buynow'.

When creating the nodes, the title field is populated with the correct data, but includes the and element tags.

The cost field doesn't get populated.

I can't see where my XPath query is going wrong, so I'm unsure if it's a problem with that or something that isn't happening properly elsewhere in the XPath Parser module. So far as I can see, the mappings are set up as they should be.

Can anybody see if my XPath queries are correct for the XML feed above?

  • can you post your code with your question?
    – Aboodred1
    May 8, 2013 at 16:46

1 Answer 1


Have you tried turning on debugging in the Xpath Parser? It can give you an idea of what is going into the field before any interference like the formatting of the field itself.

I also use Firepath which is an add-on for Firefox for use with Firebug. I don't use Xpath very often- kind of a quick means to an end- and the two of these tools have been invaluable. Firepath will help you find out if your Xpath is correct.

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.