File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting Nulpointer in xml file parsing

 
sam liya
Ranch Hand
Posts: 1240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my main activity



i am getting nullpointer exception at below line.



below is the xml my file



i am getting whole xml file in below line

 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sam liyanage wrote:i am getting nullpointer exception at below line.

Past the actual stack trace. A null pointer exception always happens for the same reason: a variable you are dereferencing on a line doesn't point to an Object. You are not dereferencing any variables on that line, so that line can not be the line actually causing the exception.
 
sam liya
Ranch Hand
Posts: 1240
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Steve.Problem solve now.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic