Free Support Forum - aspose.com

Aspose.cells for Java - Smart Markers - assign XML to DataTable

Hi,

could you please tell me the best way to assign data from an XML file to smart markers in the the design template?

I've seen that this appears to be quite simple in .NET "DataTable.ReadXML() or DataSet.ReadXML() methods", but is there an equally simple way to do this in Java?

If not, what is the best way to assign XML data to an AsposeDataTable object?

Many thanks and kind regards, Brian

Hi,

Well, as you know the DataTable/DataSet.ReadXML() method are .NET’s own API/SDK (System.Data namespace), but, I think there is no such (equivalent) API in Java’s SDK, although you may try to find some third party tools for parsing xml files for your need.

In short, I am afraid you have to implement your own logic to bind xml data to ResultSet or AsposeDataTable object for smart markers.

Thank you.

Hi Amjad,

I thought as much but thanks for your reply. I'm parsing the XML with SAX and creating a list of HashMaps in the DataTable constructor. Then I setDataSource with this DataTable object. Seems to work!

Kind regards, Brian