@@ -0,0 +1,1573 @@
+import java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.IOException;%0Aimport java.util.HashMap;%0A%0Aimport javax.xml.parsers.DocumentBuilder;%0Aimport javax.xml.parsers.DocumentBuilderFactory;%0Aimport javax.xml.parsers.ParserConfigurationException;%0Aimport javax.xml.xpath.XPath;%0Aimport javax.xml.xpath.XPathExpressionException;%0Aimport javax.xml.xpath.XPathFactory;%0A%0Aimport org.w3c.dom.Document;%0Aimport org.xml.sax.SAXException;%0A%0A%0Apublic class XMLDataManager %7B%0A%09%0A%09public static HashMap%3CString, String%3E RetrieveDataFromXML(String XmlFilePath,String RootNode,String IdNode,String...data ) throws ParserConfigurationException, FileNotFoundException, SAXException, IOException, XPathExpressionException%7B%0A%09%09//The XML File%0A%09%09File xmlInput = new File(XmlFilePath);%0A%09%09//XPath%0A%09%09XPath xPath =  XPathFactory.newInstance().newXPath();%0A%09%09//Result HashMap%0A%09%09HashMap%3CString, String%3E resultMap = new HashMap%3CString,String%3E();%0A%09%09//Parser%0A%09%09DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();%0A%09%09DocumentBuilder builder = null;%0A%09%09builder = builderFactory.newDocumentBuilder();%0A%09%09//XML Document Parsed using parser%0A%09%09Document document = builder.parse(new FileInputStream(xmlInput));%0A%09%09//Getting the request data%0A%09%09String req_data %5B%5D = data;%0A%09%09for(int index=0;index%3Creq_data.length;index++)%7B%0A%09%09%09//Construction of the query%0A%09%09%09String xpathQuery = %22//%22 + RootNode + %22%5B@id='%22 + IdNode + %22'%5D/%22 + req_data%5Bindex%5D; %0A%09%09%09resultMap.put(req_data%5Bindex%5D,  xPath.compile(xpathQuery).evaluate(document));%0A%09%09%7D%0A%09%09return resultMap;%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create XMLDataManager.java