...
Code Block |
---|
stax:org.superbiz.FooContentHandler
|
From Camel 2.11.1 onwards you can lookup a org.xml.sax.ContentHandler
bean from the Registry using the # syntax as shown:
Code Block |
---|
stax:#myHandler
|
Usage of a content handler as StAX parser
...
Where stax
is a static method on org.apache.camel.component.stax.StAXBuilder
which you can static import in the Java code. The stax builder is by default namespace aware on the XMLReader it uses. From Camel 2.11.1 onwards you can turn this off by setting the boolean parameter to false, as shown below:
Code Block |
---|
|
from("file:target/in")
.split(stax(Record.class, false)).streaming()
.to("mock:records");
|
The previous example with XML DSL
...
Wiki Markup |
---|
{snippet:id=e1|lang=xml|url=camel/trunk/components/camel-stax/src/test/resources/org/apache/camel/component/stax/SpringStAXJAXBIteratorExpressionTest.xml} |
Include Page |
---|
| CAMEL:Endpoint See AlsoCAMEL: |
---|
| Endpoint See Also |
---|
|