...
Tip | ||
---|---|---|
| ||
It is possible to use this data format with more than one context path. You can specify context path using |
Partial marshalling/unmarshalling
This feature is new to Camel 2.2.0.
JAXB 2 supports marshalling and unmarshalling XML tree fragments. By default JAXB looks for @XmlRootElement
annotation on given class to operate on whole XML tree. This is useful but not always - sometimes generated code does not have @XmlRootElement annotation, sometimes you need unmarshall only part of tree.
In that case you can use partial unmarshalling. To enable this behaviours you need set property partClass
. Camel will use pass this class to JAXB's unmarshaler.
Wiki Markup |
---|
{snippet:id=example|lang=xml|url=camel/trunk/components/camel-jaxb/src/test/resources/org/apache/camel/example/springDataFormatPartial.xml} |
For marshalling you have to add partNamespace
attribute with QName of destination namespace. Example of Spring DSL you can find above.
Ignoring the NonXML Character
...