In my software im receiving a xml file that is containing some HTML entities like & amp; or whatever. Im successfull decoding the xml but not the HTML entities. The strings are cutted when they meet an html entities... Anybody can help ? I have such code actually to decode the xml...
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
InputStream inputStream = entity.getContent();
Document dom = builder.parse(inputStream);
inputStream.close();
Element racine = dom.getDocumentElement();
NodeList nodeLst=racine.getElementsByTagName("product");
Does anyone know how i can do the same job, decoding the xml as a dom object and also decoding HTML entities ?
Actually my dom object is not correct because its contain some strings that are cutted because of HTML entities... what can i do ?