do you know of any tool which creates an AST from a Java program or class and creates an XML representation (Collection or single XML document) from the AST?
Not any tools directly, but http://www.antlr.org/ is the defacto tool for building ASTs from any general language. And there exists several grammar files for Java that you can repurpose for your own programs. So grab ANTLR, use the latest Java grammer, and write out the XML representation you want.