public void modifyDocument(File inputXml) {

    try {
      SAXReader saxReader = new SAXReader();
      Document document = saxReader.read(inputXml);

      List list = document.selectNodes("/mediawiki");
      Iterator iter = list.iterator();
      System.out.println(list.size());
      
      while(iter.hasNext()){
        Element page = (Element)iter.next();
        Element textEle = page.element("revision").element("text");
        System.out.println(textEle.getTextTrim());
      }
      
     System.out.println(list.size());
      System.out.println();
      
    }catch (Exception e) {
      System.out.println(e.getMessage());
    }
  }