# Maven Doxia API.

The Doxia API is based on Sinks and Parser objects: its goal is to parse a given source model using a given parser, and emits Doxia events into the given sink.

## Using Maven Doxia API

The following snippet shows how to use the Doxia API:

`File userDir = new File( System.getProperty ( "user.dir" ) ); File inputFile = new File( userDir, "test.apt" ); File outputFile = new File( userDir, "test.html" ); Reader source = ReaderFactory.newReader( inputFile, "UTF-8" ); SinkFactory sinkFactory = (SinkFactory) lookup( SinkFactory.ROLE, "html" ); // Plexus lookup Sink sink = sinkFactory.createSink( outputFile.getParentFile(), outputFile.getName() ) ); Doxia doxia = (Doxia) lookup( Doxia.ROLE ); // Plexus lookup doxia.parse( source, "apt", sink );`

## Resources

- Maven Doxia Website
- Plexus