It is currently Sun Feb 23, 2025 10:23 am
public class PlainTests {
static final String TEST_STRING = "<html><head>" +
"</head>" +
"<body>" +
"<ol><li>a</li><li>b</li></ol>" +
"</body>" +
"</html>";
public static void main(String[] args) throws ParserConfigurationException, Docx4JException {
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage(PageSizePaper.A4, true);
XHTMLImporterImpl XHTMLImporterForContent = new XHTMLImporterImpl(wordMLPackage);
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporterForContent.convert(TEST_STRING, null));
wordMLPackage.save(new File("test.docx"));
}
}
public class PlainTests {
static final String TEST_STRING = "<html>" +
"<body>" +
"<ul><li>" +
"<table align=\"center\" border=\"1\">" +
"<tr><td>1</td></tr>" +
"</table>" +
"</li></ul>" +
"</body>" +
"</html>";
public static void main(String[] args) throws ParserConfigurationException, Docx4JException {
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage(PageSizePaper.A4, true);
XHTMLImporterImpl XHTMLImporterForContent = new XHTMLImporterImpl(wordMLPackage);
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporterForContent.convert(TEST_STRING, null));
wordMLPackage.save(new File("test.docx"));
}
}
<dataBinding xpath="count(/Template[1]/ServiceInterfaces[1]/SenderServiceInterfaces[1]/SenderServiceInterface[1]) > 0 or count(/Template[1]/ServiceInterfaces[1]/ReceiverServiceInterfaces[1]/ReceiverServiceInterface[1]) > 0" storeItemID="{B981C26E-07CC-4E04-8DB5-6381C1213442}"/>
<condition id="Qavcs">
<xpathref id="HdIU7"/>
</condition>
Total posts 10142 • Total topics 2852 • Total members 2083