{{theTime}}

Search This Blog

Total Pageviews

Method to build Document using xml file.

import javax.xml.parsers ;

private Document buildXmlDocument(File file) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance() ;
DocumentBuilder builder = null ;
try {
builder = factory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
e.printStackTrace();
}
Document doc = null;
try {
doc = builder.parse(file);
} catch (SAXException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return doc ;
}

No comments:

Saga Design Pattern

The Saga design pattern is a way to manage distributed transactions in a microservices architecture. In a microservices environment, where d...