{{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:

Generate Insert Sql from Select Statement

SELECT 'INSERT INTO ReferenceTable (ID, Name) VALUES (' +        CAST(ID AS NVARCHAR) + ', ''' + Name + ''...