이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 281. RSS DataFormat
Available as of Camel version 2.1
The RSS component ships with an RSS dataformat that can be used to convert between String (as XML) and ROME RSS model objects.
-
marshal = from ROME
SyndFeed
to XMLString
-
unmarshal = from XML
String
to ROMESyndFeed
A route using this would look something like this:
The purpose of this feature is to make it possible to use Camel’s lovely built-in expressions for manipulating RSS messages. As shown below, an XPath expression can be used to filter the RSS message:
Query parameters If the URL for the RSS feed uses query parameters, this component will understand them as well, for example if the feed uses alt=rss
, then you can for example do from("rss:http://someserver.com/feeds/posts/default?alt=rss&splitEntries=false&consumer.delay=1000").to("bean:rss");
281.1. Options
The RSS dataformat supports 1 options which are listed below.
Name | Default | Java Type | Description |
---|---|---|---|
contentTypeHeader |
|
| Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc. |