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 FileSystem.getProperty "user.dir" ) );
  File inputFile = new FileuserDir, "test.apt" );
  File outputFile = new FileuserDir, "test.html" );

  Reader source = ReaderFactory.newReaderinputFile, "UTF-8" );

  SinkFactory sinkFactory = (SinkFactorylookupSinkFactory.ROLE, "html" )// Plexus lookup
  Sink sink = sinkFactory.createSinkoutputFile.getParentFile(), outputFile.getName() ) );

  Doxia doxia = (DoxialookupDoxia.ROLE )// Plexus lookup

  doxia.parsesource, "apt", sink );

Resources



Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.