public void modifyDocument(File inputXml) {

    try {
      SAXReader saxReader = new SAXReader();
      Document document = saxReader.read(inputXml);
      
      Map<String, String> namespaceUris = new HashMap<String, String>();  
      namespaceUris.put("mediawiki", "http://www.mediawiki.org/xml/export-0.3/");
      
      XPath xPath = DocumentHelper.createXPath("//mediawiki:page");
      xPath.setNamespaceURIs(namespaceUris);
      
      List list = xPath.selectNodes(document);
      Iterator iter = list.iterator();
      System.out.println(list.size());
      String[] keywords = {"Authority","disaster"};
      
      while(iter.hasNext()){
        Element page = (Element) iter.next();
        Element textEle = page.element("revision").element("text");
        Element timeEle = page.element("revision").element("timestamp");
        for (String keyword : keywords) {
          if (textEle.getTextTrim().contains(keyword)) {
            System.out.println(page.asXML());
            break;
          }
        }
      }
      
      
    }catch (Exception e) {
      e.printStackTrace();
    }
  }