I have to design an application that converts XHTML documents to XML documents using Java. What Java APIs should I use?

Kyle Dyer

XHTML is well formed XML, according to the spec. As such you should be able to use a XSLT Java API and a stylesheet to transform XHTML to the XML you want.

For XSLT API look at:
James Clark helped write XSLT
Saxon is the work of Michael Kay. He also wrote a good book called "XSLT Programmer's Reference".

The Java part of such an app would be minimal -- just enough to open the XML docs and apply the XSLT to it. Kay's work includes a standard API for this which abstracts the XSLT engine. I think saxon and xt include apps that already do this.