Code example for InputSource

Methods: setEncoding

0
			 
			MensaHandler myMensaHandler = new MensaHandler();
			 
			xr.setContentHandler(myMensaHandler);
			 
			InputSource isource = new InputSource(_url.openStream());
			isource.setEncoding("UTF-8");
			 
			xr.parse(isource);
			 
			data = myMensaHandler.getParsedData();
			  
			 
		} catch (ParserConfigurationException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (SAXException e) {
			// TODO Auto-generated catch block 
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block