解决方法
XMLReader xmlReader = XMLReaderFactory.createXMLReader ("org.ccil.cowan.tagsoup.Parser"); ContentHandler handler = new DefaultHandler () { public void startElement (String uri,String localName,String qName,Attributes attributes) throws SAXException { // ... } }; xmlReader.setContentHandler (handler); xmlReader.parse (new InputSource (input));