utf-8 using standard openStream and DocumentBuilder



Need to convert the format of output to utf-8, because the output is not treating special characters. Anyone have any idea how can this be done?



`
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
URL u = new URL("http://ift.tt/1CfRW1l");
Document doc = builder.parse(u.openStream());
NodeList nodes = doc.getElementsByTagName("item");`

No comments:

Post a Comment