.newInstance();
DocumentBuilder ibatisConfigBuilder = factory.newDocumentBuilder();
InputStream inputStream = Resources.getResourceAsStream("SqlMapConfig.xml");
Document doc = ibatisConfigBuilder.parse(inputStream);
NodeList sqlMapElem = doc.getElementsByTagName("sqlMapConfig");
Element elem = doc.createElement("sqlMap");
elem.setAttribute("resource", "sqlMap.xml");
sqlMapElem.item(0).appendChild(elem);
Transformer trans = TransformerFactory.newInstance().newTransformer();
File tempFile = File.createTempFile("sqlMapConfig", ".xml");
tempFile.deleteOnExit();
trans.transform(new DOMSource(doc),new StreamResult(tempFile));