Hi, all. My app will recieve html data from Internet. And I want to pick up some usful information in the data. So I use:
Reader reader = new InputStreamReader(entity.getContent()); InputSource inputsource = new InputSource(reader); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(inputsource); Element e = (Element) doc.getElementsByTagName("title").item(0); Logcat showed a SAXParserExcetion:expected:/linK read: head(position END_TAG</HEAD>.... Am I on the right way? Or javax.xml.parsers.DocumentBuilder can't be used to parse html? How should I do? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---