Package org.apache.maven.doxia

Maven Doxia API.

See:
          Description

Interface Summary
Doxia Basic interface of the Doxia framework.
 

Class Summary
DefaultDoxia Simple implementation of the Doxia interface: uses a ParserManager to lookup a parser.
 

Package org.apache.maven.doxia Description

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



Copyright © 2005-2012. All Rights Reserved.