public String parseGetUpdateTime(String content) { UpdateTimeHandler handler = new UpdateTimeHandler(); try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); saxParser.parse(new InputSource(new StringReader(content)), handler); } catch (Exception e) { } return handler.getResult(); }
public String parseGetUpdateTime(File file) { UpdateTimeHandler handler = new UpdateTimeHandler(); try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser saxParser = factory.newSAXParser(); saxParser.parse(file, handler); } catch (Exception e) { } return handler.getResult(); }