Class VariableReplaceStAX

java.lang.Object
org.docx4j.samples.VariableReplaceStAX

public class VariableReplaceStAX extends Object
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.
  • Field Details

  • Constructor Details

    • VariableReplaceStAX

      public VariableReplaceStAX()
  • Method Details