title: apache caml converting xml to json
body: <p>i am trying to convert xml to json using apache camel xmltojson , below are my two classes :</p>
  
  <pre><code>public class Route extends RouteBuilder {
  
  @Override
  public void configure() throws Exception {
      XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
      xmlJsonFormat.setForceTopLevelObject(true);
      from("file:resource/inbox").marshal(xmlJsonFormat).to("file:resource/outbox");
      }
  
   }
  </code></pre>
  
  <p>And the main class </p>
  
  <pre><code> public class MainApp {
  
  public static void main(String[] args) {
      Route routeBuilder = new Route();
      CamelContext context = new DefaultCamelContext();
      try {
          context.addRoutes(routeBuilder);
          context.start();
          Thread.sleep(5000);
          context.stop();
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And below is the xml in src/main/resource/inbox folder </p>
  
  <pre><code>   &lt;message&gt;
     &lt;splash name="hello" text="hello"/&gt;
     &lt;splash name="Kaise ho" text="Kaise ho"/&gt;
     &lt;tag name="Latest" text="Latest"/&gt;
     &lt;tag name="New" text="New"/&gt;
     &lt;tag name="Just Added" text="Just Added"/&gt;
     &lt;tag name="Featured" text="Featured"/&gt;
     &lt;tag name="Popular" text="Popular"/&gt;
     &lt;tag name="Just Arrived" text="Just Arrived"/&gt;
     &lt;tag name="New Arrival" text="New Arrival"/&gt;
     &lt;promptlogin name="hello" text="hello"/&gt;
     &lt;promptsubscribe name="hello" text="hello"/&gt;
     &lt;/message&gt;
  </code></pre>
  
  <p>it is giving the below error : </p>
  
  <pre><code> org.apache.camel.FailedToCreateRouteException: Failed to create route route1 at: &gt;&gt;&gt; Marshal[org.apache.camel.model.dataformat.XmlJsonDataFormat@49070868] &lt;&lt;&lt; in route: Route(route1)[[From[file:resource/inbox]] -&gt; [Marshal[org.ap... because of Data format 'xmljson' could not be created. Ensure that the data format is valid and the associated Camel component is present on the classpath
  </code></pre>