The XmlDoclet outputs XML documents instead of HTML documents. The XML documents can then be further processed, using other tools, in order to produce reports or as input to other applications.

Creates XML documents based on the Java source code and, if specified by the user, processes the XML document using an XSLT style sheet.

The source code can be processed using a couple of different document creators, each one designed to produce XML documents for different purposes (be they generic or specific purposes).

The primary objective of this doclet is to aid developers in creating more useful web sites for their source code when using the mvn site command.

The doclet has a couple of configuration attributes which makes it highly versatile.

Required Javadoc Configuration

Make sure Javadoc is started with these options:

  • doclet set to info.mikaelsvensson.devtools.doclet.xml.XmlDoclet
  • docletpath set to the path of doclet.jar.

For more information about how to make Javadoc use this Doclet, check out the Getting Started pages:

Doclet Configuration Options

These options are used only by the XmlDoclet doclet (they are specified in the same way as other Javadoc options).


Specifies which formatter to use to produce the XML document. A formatter is sometimes also referred to as a document creator. Each formatter produces XML content is a very specific way and choosing the most appropriate depends highly on your documentation needs.

In order to further customize the output, some formatters have their own configuration options.


Specifies the name of the resulting file. Usually this is an XML document.


Forces the Doclet to save the untransformed XML document as a separate file.


Specifies an (optional) post processor to invoke after the document creator (i.e. the formatter) has been invoked. This is, for example, useful when the formatter produces multiple files and these files need to be "handled" in some way.


Specifies an XSL transformer document to apply to the XML document generated by the formatter.

Document Creators

A document creator, also known as a formatter, defines how the resulting XML document will be constructed. The document creator takes the Javadoc documentation and processed it into an XML document.

Different document creators offer different features in terms of what information is put into the XML document. Some creators are very verbose and generate large XML documents with tons of information. Others producer compacter output or very specific output for a subset of the documented classes.

Choose a document creator based on how you plan to use the generated XML document, i.e. what kind of information you need extracted from the source code.


More information, options and samples


Very simple document creator which only outputs a list of class names.

More information, options and samples


Highly specialized document creator which only outputs information about enum classes. On the other hand, it attempts to load each enum constant (using class loader) in order to access their run-time values.

More information, options and samples


More information, options and samples


Provides a lot of information of classes, interfaces, methods and so on. This document generator covers most use cases, especially since it has a few configuration options.

More information, options and samples

Back to top

Reflow Maven skin by Andrius Velykis.