Closed (fixed)
Project:
Feeds
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2010 at 06:39 UTC
Updated:
16 Mar 2010 at 14:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
lyricnz commentedObviously, a matching extension would need to be done to ::getMappingSources()
Comment #2
lyricnz commentedFirst attempt at a patch attached. This uses a protected method on FeedsSimplePieParser for the additional mapping.
Here's an example of an extension using the code from the patch. It overrides getMappingSources() to add the new mapping sources, and implements the new method provided by the patch to add parsing for these items.
Comment #3
alex_b commentedInteresting.... without reviewing your patch closer, have you had a look at this issue: #631104: Extensible XML parser (mapping more sources)?
Comment #4
lyricnz commentedYes, I had a look - but that's aiming at something different - a completely generic+extensible XML parser. This patch simply aims to make the SimplePieParser extensible, since it already does 90% of what is needed.
Comment #5
alex_b commented#4 - Right.
I think this is a good approach for now. The obvious downside is that only one parser can extend this functionality at a time. If ever we would want to have multiple actors extend parsing we would have to add an API along the lines of the mapping API. But I assume that's too much to bite off at this moment.
RTBC from my point of view. Once this is committed, I'd like to incorporate #2 into the documentation.
Comment #6
alex_b commentedCommitted. Thanks.
http://drupal.org/cvs?commit=336032
Comment #7
alex_b commentedAdded #2 to documentation: http://drupal.org/node/622700