Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting Nulpointer in xml file parsing

 
sam liya
Ranch Hand
Posts: 1240
  • 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
Posts: 4181
21
IntelliJ IDE Java Python
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Steve.Problem solve now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic