Package org.docx4j.samples
Class VariableReplaceStAX
java.lang.Object
org.docx4j.samples.VariableReplaceStAX
This is an example of using StAX rather than JAXB for
processing. StAX is useful for very large files, since
it uses less memory than JAXB. There are also some
things StAX is better adapted for.
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 StAX.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mappings
-
-
Constructor Details
-
VariableReplaceStAX
public VariableReplaceStAX()
-
-
Method Details
-
main
- Throws:
Exception
-