Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Android and the fly likes getting Nulpointer in xml file parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "getting Nulpointer in xml file parsing" Watch "getting Nulpointer in xml file parsing" New topic
Author

getting Nulpointer in xml file parsing

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1239
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

Joined: Jan 28, 2003
Posts: 4181
    
  21

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

Joined: Nov 25, 2008
Posts: 1239
Thanks Steve.Problem solve now.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getting Nulpointer in xml file parsing