TOM and XML in action

Here is the simple java code for extracting mail information:
  private String extractEMail(TNode authors) {
    String res = "";
    %match(TNode authors) {
      <authors domain=thedomain> 
        <author firstname=fnval lastname=lnval/>
        </authors> -> {
        res += fnval+"."+lnval+"@"+thedomain+"\n";
      }
    }
    return res;
  }

Source Code: The Applet and the TOM code