Code example for CharArrayReader

0
			monitorResult = new MonitorResult();
			SAXParserFactory spf = SAXParserFactory.newInstance();
			SAXParser sp = spf.newSAXParser();
			XMLReader xr = sp.getXMLReader();
			xr.setContentHandler(this);
			CharArrayReader carr = new CharArrayReader(xml.toCharArray());
			xr.parse(new InputSource(carr));
			if (wrongUserPass)
				return null; 
			if (!isMonitorResult)
				return null; 
			return monitorResult;
		} 
		catch (IOException e)
		{ 
			Log.e("ShowDataXMLParser", e.toString());
			return null; 
		} 
		catch (SAXException e)
		{ 
			Log.e("ShowDataXMLParser", e.toString());