XMLBinding xmlBindingV2 = new XMLBinding().add("v2-binding-config.xml");
xmlBindingV1.intiailize();
xmlBindingV2.intiailize();
// Read the v1 order XML into the Order Object model...
Order order = xmlBindingV1.fromXML(new StringSource(orderV1XMLMessage), Order.class);
// Write the Order object model instance back out to XML using the v2 XMLBinding instance...
String outXML = xmlBindingV2.toXML(order); // (Note: There's also a version of toXML() that takes a Writer)
// Display read/write info to the example user...