That would be perfect, however that's not the case here.
Perhaps I should be more specific.
Given a Text node, obtained from:
- Code: Select all
Object objNode = documentPart.getJAXBNodesViaXPath("//w:t").get(0);
How do I get the R parent node?
The Object is a JAXBElement<T> node, its value is an org.docx4j.wml.Text node.
As you've written on the getting started guide, I can cast the value to a Text node:
- Code: Select all
JAXBElement jNode = (JAXBNode) objNode;
Text textNode = (Text) objNode.getValue();
However, calling getParent() on the textNode will only give me back the JAXBElement node.