My XML response is
<name> DPD futár </name>
My XML parsing code
SAXParserFactory _saxFactory = SAXParserFactory.newInstance();
SAXParser _saxParser = _saxFactory.newSAXParser();
XMLReader _xmlReader = _saxParser.getXMLReader();
_shippingMethodList = new ArrayList<ShippingMethodItem>();
ShippingMethodParser _cartLoginParser = new ShippingMethodParser(
_shippingMethodList);
_xmlReader.setContentHandler(_cartLoginParser);
InputSource is = new InputSource();
is.setEncoding("ISO-8859-1");
is.setCharacterStream(new StringReader(response));
_xmlReader.parse(is);
But I got following as string in my name variable.
DPD futár
I also try with
is.setEncoding("UTF-8");
But not getting success. Can anybody please help me regarding this ?