Hello Oliver!

I think another possibility could be for you to use JAXB to unmarshal your
XML document into a java bean. Then you can use the following expression in
your velocity template: $body.username

Please have a look on this test:

http://svn.apache.org/viewvc/camel/trunk/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java?view=markup

and

http://svn.apache.org/viewvc/camel/trunk/components/camel-velocity/src/test/resources/org/apache/camel/component/velocity/BodyAsDomainObject.vm?view=markup

Regards,
Christian

Reply via email to