while parsing an xml i have encountered a problem, only the class which extends DefaultHandler is returning the String. I have setup another class with getter setter methods to set values from Handler and getting these value from the Activity class, but it doesnt work! any help would be appreciated.\[code\]//Activity classURL website = new URL(fullURL);SAXParserFactory spf = SAXParserFactory.newInstance();SAXParser sp = spf.newSAXParser();XMLReader xr = sp.getXMLReader();HandlingXMLData doingWork = new HandlingXMLData();xr.setContentHandler(doingWork);xr.parse(new InputSource(website.openStream()));obsTime.setText(doingWork.getInfo()); // this one works fineCollectedData info = new CollectedData();weather.setText(info.getObsTime()); // returning null\[/code\]getting value from xml and send to the setter method:\[code\] //DefaultHandler class CollectedData data = http://stackoverflow.com/questions/14537147/new CollectedData(); data.setObsTime(obsTime);public String getInfo(){ return data.getObsTime(); // getting value from this method works, but i want to get value from the CollectedData class}\[/code\]the class with getter/setter methods:\[code\]public class CollectedData {String getObsTime;public String getObsTime() { return getObsTime;}public void setObsTime(String obsTime) { getObsTime = obsTime;}}\[/code\]