为什么aspose word 运行 parentNode可以是StructuredDoccumentTag

Why aspose word Run parentNode can be StructuredDoccumentTag

对于aspose词API,

https://apireference.aspose.com/java/words/com.aspose.words/run#ParentNode

Run can only be a child of Paragraph.

但是我发现运行的父节点是StructredDocumentTag,为什么?

System.out.println("x.getClass().getName()=" + x.getClass().getName()); //return com.aspose.words.Run
System.out.println("x.getParentNode().getClass().getName()="+ x.getParentNode().getClass().getName()); //return com.aspose.words.StructuredDocumentTag!!

你是对的。 运行 也可以是 SDT 的子代。文档必须更新。 SDT实际上可以出现在文档的几乎任何地方 https://apireference.aspose.com/java/words/com.aspose.words/StructuredDocumentTag 如果它放在行内级别,它可以包含段落可以包含的任何内容。