1. Assuming the servlet can create a temporary file, it can record the file location in the session.
2. For transforming the XML document to some format, look into XSLT - there is probably a tag library to support this.
I suggest you dont try to get everything working at once, proceed step by step.