This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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: 1238
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: 1238
Thanks Steve.Problem solve now.
 
Consider Paul's rocket mass heater.
 
subject: getting Nulpointer in xml file parsing