5. XMLDoclet

XMLDoclet is a Doclet for writing XML files from Java Source Documentation. It comes with XSL style sheets to transform the XML file into various structured text formats and supports a Floating Table of Content.

Latest stable release: xml-doclet-1.3.0.jar

Development version: xml-doclet-1.4.0-SNAPSHOT.jar


  • Supports Java 11, Java 17 and Java 21

  • Maven/Gradle integration

  • Output Formats
    • XML

    • Restructured Text (.rst) for Sphinx/Docutils

    • Markdown (.md)

    • Docbook (.db.xml)

    • Ascii Doctor (.adoc)


XMLDoclet has been used to generate the API Documentation of the following sites:

Command Line Options (CLI)

--d <directory>

Destination directory for output file [.\]

--docencoding <encoding>

Encoding of the output file [UTF8]


Parse javadoc, but don’t write output file [false]

--filename <filename>

Name of the output file [javadoc.xml]


Write Restructured Text (.rst) that can be used with Sphinx [false]


Not implemented yet: Write Markdown (.md) [false]


Not implemented yet: Write DocBoook XML (.db.xml) [false]


Not implemented yet: Write Ascii Doctor (.adoc) [false]

--basePackage <name>

If set, shorten the Qualified Names by the Base Package name


Integrate the Floating TOC (you need to add the CSS and JS to the CMS) [false]