• Post Reply Bookmark Topic Watch Topic
  • New Topic

error occuring when xml file is running

 
madhuri kunchala
Ranch Hand
Posts: 350
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to parse the xml file to java....while running the java file.... i am getting occur as

Error --- at xmlpkg.XMLReader.main(XMLReader.java:20)

the code is

File file = new File("E:\\MyXMLFile.xml");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(file); -----------------> the error is getting here
doc.getDocumentElement().normalize();

can anyone help me out...
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Madhuri,

Please post the XML and error stack trace verbatim. Without those, it's tough to say anything other than "Check your XML".

Cheers
Karthik
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!