Modello StAX Plugin
Modello StAX Plugin generates XML readers and writers based on
StAX API,
plus reader delegates to be able to read multiple model versions.
Notice: DOM content type can be represented either as
plexus-utils' Xpp3Dom
or, since Modello 1.6, standard
org.w3c.dom.Element objects
stax-reader
stax-reader generator creates
my.model.package.io.stax.ModelNameStaxReader class with following
public methods:
- public RootClass ( Reader reader, boolean strict )
throws IOException, XMLStreamException
- public RootClass read( Reader reader )
throws IOException, XMLStreamException
- public RootClass read( String filePath, boolean strict )
throws IOException, XMLStreamException
- public RootClass read( String filePath )
throws IOException, XMLStreamException
In addition, if multiple model reader versions are generated (each in its own package), it creates a delegate
my.model.package.io.xpp3.ModelNameStaxReaderDelegate class with
following public methods:
- public Object read( File f, boolean strict )
throws IOException, XMLStreamException
- public Object read( File f )
throws IOException, XMLStreamException
Depending on the model version found in the XML content, the returned Object will be of the right
version package.
stax-writer
stax-writer generator creates
my.model.package.io.stax.ModelNameStaxWriter class with following
public methods:
- public void write( Writer writer, RootClass root )
throws IOException, XMLStreamException