title: JAXB marshalling in Apache Camel
body: <p>I am new to Apache camel and need to perform a task where I need to marshal an object to XML file. I am using the below code but it is not working. Here, <code>foo.pojo</code> is package where JAXB annotated classes are present</p>
  
  <pre><code>JaxbDataFormat jaxbDataFormat =  new JaxbDataFormat("foo.pojo");
  from("direct:start").marshal(jaxbDataFormat).to("file:C:/Users/Anand.Jain/Desktop/hello/abc.xml").end();
  </code></pre>