:: Forum >>

merging XML tables to add records?

Hi,

I'd like to know if this is possible to merge XML tables (same structure)? I need to add some records in my grid, and keep the previous ones?
Is it better to use JSON in this case?

Thank you in advance
MF
Monday, February 18, 2008
I've finally found a solution to merge 2 XML tables with Sarissa library.
http://dev.abiss.gr/sarissa/

<script type="text/javascript" src="sarissa.js"></script>

...

var req = new AW.HTTP.Request;
req.setURL(url);
req.setAsync(false);

req.response = function(data) {
var newXMLdata = this.getResponseXML();
var currentXML = dataTable.getXML();
var rootFrom = newXMLdata.getElementsByTagName("root")[0];
var rootTo = currentXML.getElementsByTagName("root_list")[0];

Sarissa.copyChildNodes(rootFrom, rootTo, true);

dataTable.setXML(currentXML);
};

req.request();


Hope it can help someone else...
MF
Tuesday, March 4, 2008

This topic is archived.


Back to support forum

Forum search