Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added information about partial operations from CAMEL-2381 improvement.

...

For marshalling you have to add partNamespace attribute with QName of destination namespace. Example of Spring DSL you can find above.

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

...