Something like this parser just screams for a 'mapping on import' functionality.
(i.e. do not define all field mappings beforehand, but fetch the source mappings from the source document.

Practical example in my case: my client wants me to fetch some funny XML document over a SOAP connection, and process it. I don't know all details of the fields it contains. So I provide FeedsXPathParser with an XPath query where it can find 'all the fields for one entity'... and run it.
After this, I get a mapping screen with all the source fields that FeedsXPathParser has extracted from the first entity found.)

So, there is a patch for 'Mapping on Import' functionality for feeds, which isn't committed yet. It's a moving target -- currently, you need CVS HEAD + the patch in http://drupal.org/node/651478#comment-3457958.

I believe that Feeds XPath Parser with this patch applied, will also keep working on the 'stable' version of Feeds; you just won't notice any difference.

There are also a few minor other things in this patch - like a proper redefinition of the return value of SourceDefaults(). That might not have been an issue before, but the array has to include keys which are equal to the config options... otherwise these options never get saved/remembered.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roderik’s picture

Assigned: Unassigned » roderik
Status: Needs review » Needs work
FileSize
9.89 KB

OK this is a definite 'needs work'. Ignore unless you want mapping on import.

(You can use this -- if you patch feeds 1.0-beta7 with http://drupal.org/node/651478#comment-3464310 . But it needs some feedback which I'll open a separate issue for.)

twistor’s picture

Category: bug » feature
Priority: Normal » Minor
Status: Needs work » Postponed

Putting this off until this gets into Feeds. Seems to have stalled lately.

mitchell’s picture

Priority: Minor » Normal

Not sure if this would ever be possible without using preconfigured templates, which would defeat the purpose of making mapping significantly easier. The default mapping ability (import/export) already offers 90% of the benefit that templates would provide anyway.

One idea though to at least make tag auto-discovery possible is to have the user supply the context so it would be possible to narrow in on the desired values. Then make each tag selectable from that point, or better yet with some intelligent filtering. Perhaps this will lead to some ideas on how to auto-discover the context as well.

Also worth noting is Dapper's interface, which allows you to click on rendered html to find the tags.

twistor’s picture

Status: Postponed » Closed (won't fix)

Maybe one day.