try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
// File xml = new File(filePath);
ResourceLoader resource = new ResourceLoader(filePath);
Document document = db.parse(resource.getInputStream());
Binder<Node> binder = getJAXBContext().createBinder();
binder.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
InputTestData testData = (InputTestData) binder.unmarshal(document);
updateTestMethods(testData, actualData);
binder.updateXML(testData);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer t = tf.newTransformer();
t.transform(new DOMSource(document), new StreamResult(resource.getFileOutputStream()));
} catch (ParserConfigurationException e) {
LOG.error("Ignoring the write operation as ParserConfigurationException occured while parsing the file : " + filePath, e);
} catch (SAXException e) {
LOG.error("Ignoring the write operation as SAXException occured while parsing the file : " + filePath, e);
} catch (IOException e) {