Package org.docx4j.samples
Class VariableReplaceSAX
java.lang.Object
org.docx4j.samples.VariableReplaceSAX
This is an example of using SAX rather than JAXB for
processing. There's another example which uses StAX.
Unless you have a particular reason for wanting to
use SAX, you should probably be using StAX.
NB: There are at least 3 approaches for replacing variables in
a docx.
1. as shows in this example
2. using Merge Fields (see org.docx4j.model.fields.merge.MailMerger)
3. binding content controls to an XML Part (via XPath)
and this is not the recommended approach!
It is just a good example of using SAX.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mappings
-
-
Constructor Details
-
VariableReplaceSAX
public VariableReplaceSAX()
-
-
Method Details
-
main
- Throws:
Exception
-