You can search for the heading via TraversalUtil (see https://github.com/plutext/docx4j/tree/ ... 4j/finders for some examples) or using XPath.
See Getting Started for more info.
You can search for headings via their text content, or you could ID them.
With docx4j nightlies there is get|setParaId in https://github.com/plutext/docx4j/blob/ ... wml/P.java
Or you could put a content control around the heading and table, and use a w:tag on the content control (or just its w:id). This would be a neat approach.
If your intention is just to add rows of data to the tables, I'd encourage you to explore content control data binding (OpenDoPE extensions - http://www.opendope.org), since this way, all the hard work is done for you.
Users browsing this forum: Bing [Bot] and 38 guests