We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Create a table from XML String: Java Version

I am trying to fill a table with xml data (see code below) however nothing happens.

Table inside word doc

«TableStart:projectInformation» «TableStart:item» «description»
«value» «TableEnd:item» «TableEnd:projectInformation»

Code

// Store the xml to a string
/*
<?xml version="1.0" encoding="ISO-8859-1"?>




*/

    String xml = writer.toString();
    javax.xml.parsers.DocumentBuilder db =  DocumentBuilderFactory.newInstance().newDocumentBuilder();
    InputStream is = new ByteArrayInputStream(xml.getBytes("utf-8"));
    org.w3c.dom.Document xmlDocument = db.parse(is);
    doc.getMailMerge().executeWithRegions(new XmlMailMergeDataSet(xmlDocument));

Hi Philip,


Thanks for your inquiry. To ensure a timely and accurate response, please create a standalone runnable simple Java application that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we’ll start investigation into your issue and provide you more information. Please share what version of Aspose.Words for Java are you currently using? Also, please attach your input Word document and XML file here for testing.

Best regards,