Active
Project:
Feeds QueryPath Parser
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jan 2012 at 16:12 UTC
Updated:
15 May 2012 at 18:06 UTC
I'm not sure if this would really fit into the module, but I thought it may be worth it to start a discussion.
Consider an xml file that contains with a structure like this
<dealership>
<name>Bob's Car Lot</name>
<description> We sell cool cars</description>
<car>
<make>Toyota</make>
<model>Camry</make>
</car>
<car>
<make>Infiniti</make>
<model>G20</make>
</car>
</dealership>
<dealership>
<name>John's Car Lot</name>
<description> We sell cooler cars</description>
<car>
<make>Dodge</make>
<model>Durango</make>
</car>
<car>
<make>Toyota</make>
<model>Corolla</make>
</car>
</dealership>Suppose you wanted to parse that file and in one feeds run create a set of 'dealership' nodes referenced to 'car' nodes. Currently the best way to do that is by saying context = dealership and then something like dealership>car and restructuring the arrays to give to your processor on hook_after_parse. You can't go the other way (ie context = car) because CSS has no parent operators you can use.
I'm proposing a way to set several levels of sub-contexts....
What do you guys think?
Comments
Comment #1
emptyvoid commentedWait, are you saying that I can't select nodes at multiple levels of target fragment?
So the way the GUI was programmed it doesn't traverse multiple levels of nodes in the XML structure?
Then this is totally useless, most XML files have multiple levels rarely have I had XML content that was "flat" and only one level. Furthermore, many XML files I have used in the past also use the notion of:
or
If this isn't supported by the GUI (but I know it is supported leveraging the querypath library) then I'll just write a custom module that truly leverages the querypath library instead of contorting my brain trying to get the lame GUI to somehow actually meet the needs of what I'm trying to accomplish (holy run on sentence batman).