I would like to use feeds to import xml data similar to:

<root>
  <stockcode>XXYY</stockcode>
  <classification>
    <make>Audi</make>
    <model>A2</model>
  </classification>
  <price>£1000</price>
</root>

Stockcode and price would populate fields in a node while the contents of classification would create/update an hierarchical vocabulary.

To do this I am going to write a custom parser and processor. The processor will peel off the node bits and pass them to FeedsNodeProcessor. It will then take the classification tag and update the taxonomy (without using the FeedsTermProcessor doesn't appear to handle hierarchies).

Question is whether this is all overkill, have I misunderstood feeds? Or is this the only sensible way of tackling this problem?

If there was a feeds group or IRC channel I would post there but this was the only place I could find to pose this question.

Comments

velosol’s picture

I can't speak reliably to the Taxonomy portion, as I don't have much experience in that area; however for the custom parser, there are some hints in #631104: Extensible XML parser (mapping more sources).

I believe a custom parser is the only way to go unless you have the XML data in a more standard format as well (AtomRDF, RSS, etc).

If you come up with something for term hierarchies, please consider contributing as a patch to FeedsTermProcessor as it would probably help someone else too. There may be some help at #632920: Inherit properties from parent feed node (taxonomy, author, OG, language) or #623424: Mapper for Taxonomy.

alex_b’s picture

Right, what you are looking for is an extensible or more exhaustive XML parser: #631104: Extensible XML parser (mapping more sources)

alex_b’s picture

Status: Active » Closed (duplicate)