Community marketing - RSS Import - RSS 2.0?

Does anyone know if the RSS Feed importer is compatible with RSS 2.0 namespaces? I would like to add additional fields into my feed e.g.:

<job:salary>25000</job:salary>

I’ve declared the namespace job, so it should be valid. How would I map this to the Salary field in Percussion via the spring.xml configuration file?

I’ve tried: -

<entry key="salary">
       <value>$item.job:salary;</value>
</entry>

But this is not a valid JEXL expression.

<entry key="salary">
       <value>$item.job.salary;</value>
</entry>

doesn’t work either. Any help appreciated.

Tim

Never used the tool, myself, but I’d assume they’d ignore the namespace altogether… try $item.salary

Thanks for the suggestion, but that doesn’t seem to work either: -

DEBUG [FeedParser] - executing field salary expression: $item.salary;
DEBUG [FeedParser] - Jexl Expression returned null

Although I think there is something more fundamentally wrong with my set up as I can’t even get results for some of the standard nodes either…

DEBUG [FeedParser] - executing field url expression: $feed.link;
DEBUG [FeedParser] - Setting feed field url to value http://www.i-grasp.com/fe/tpl_rm.asp?newms=se
DEBUG [FeedParser] - executing field guid expression: $item.guid;
DEBUG [FeedParser] - Jexl Expression returned null

Both the link and guid are in the feed, but only the link is returned. Strange.

The Importer uses the rome api to parse the feed https://rome.dev.java.net/
This supports custom namespaces through a module mechanism. There are ready made modules for some of the standard ones

http://wiki.java.net/bin/view/Javawsxml/RomeModules

The jar files for these can be dropped in place with no further configuration to provide support. A custom namespace would require a custom plugin to be written and compiled.

The current unsupported elements will be coming through as a block of html. You can see the result of the parsing by changing the debug option in the feed configuration to true. Changing this to true prevents any importing and just displays the imported feed objects and the results of the jexl mappings.

An alternative for more complex feeds is to use the XML import structure which would allow you to process the entire feed with an XSLT file. This would require a more complicated setup and and probably some PSO assistance.

Thanks Steve, that’s very helpful, especially how to switch on the debug mode. I managed to debug the $item object in the end by mapping it to a large text field. From this I found that the additional elements were accessible using the following notation: -

$item.modules[0].publisher

It is interesting to know that custom namespaces would need a custom plugin. I was just hoping to add a few fields in, but it seems a bit more work is involved!

Thanks again,
Tim