Exemple #1
0
  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();
  }
Exemple #2
0
  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();
  }