i trying parse xml , insert excel file. if run code works errors cannot make modification because still got errors. here code:
public class parsing { private void parsexmlfile(){ //get factory documentbuilderfactory dbf = documentbuilderfactory.newinstance(); try { //using factory instance of document builder documentbuilder db = dbf.newdocumentbuilder(); //parse using builder dom representation dom = db.parse("employee.xml"); } } catch ) } } what wrong this? can me? i've been searching on google , it's eating nerves.
it should :-
private void parsexmlfile(){ //get factory documentbuilderfactory dbf = documentbuilderfactory.newinstance(); try { //using factory instance of document builder documentbuilder db = dbf.newdocumentbuilder(); //parse using builder dom representation document dom = db.parse("employee.xml"); } catch(ioexception ex ){ // or specific exception should catched here // error handling code here } } also employee.xml should in current directory or give complete abosulte path of employee.xml file also.
Comments
Post a Comment