hi,all:
how to get a text's parent element in docx4j?
below is my code
package org;
import java.awt.Color;
import java.io.File;
import java.math.BigInteger;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import org.docx4j.TraversalUtil;
import org.docx4j.XmlUtils;
import org.docx4j.TraversalUtil.Callback;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
import org.docx4j.wml.Body;
import org.docx4j.wml.RPr;
import org.docx4j.wml.Tbl;
import org.docx4j.wml.UnderlineEnumeration;
public class OpenMainDocumentAndTraverse extends AbstractSample
{
public static void main(String[] args) throws Exception
{
try
{
getInputFilePath(args);
}
catch (IllegalArgumentException e)
{
inputfilepath = System.getProperty("user.dir")
+ "/sample-docs/sample-docx.xml";
}
WordprocessingMLPackage ...