JDynamiTe.java | Class | JDynamiTe is the unique class you need to parse a template document.
This implementation extends the DefaultDynamicElement class (from package analyser),
so a JDynamiTe object is a "Dynamic Element".
The use is very simple :
First define the input file or input stream (for example an HTML template document)
with the "setInput" method.
Secondly fill and develop this document with a few methods such as "setVariable",
and "parseDynElem".
Finally, after calling the "parse" method to finalize building your dynamic document,
you simply obtain the result with the "toString" method.
See an example in the main method of this class.
JDynamiTe elements
There are (only) two elements which make a document a "template" document.
1) "Variable Element"
A "Variable Element" is defined by an identifier in the template document.
Its value can be changed with the JDynamiTe.setValue method.
Example of use: titles, values of cells in tables, etc.
2) "Dynamic Element"
A "Dynamic Element" is a "block" which can be dynamically developed.
It has an identifier, a template definition, and a value.
Its value can be set or developed with the JDynamiTe.parseDynElem and JDynamiTe.setDynElem methods.
Example of use: list, table, enumeration, etc.
Template document syntax
There are only 3 tags to use JDynamiTe : "Variable" tag, "Begin Dynamic Element" tag, and
"End Dynamic Element" tag. |