:: Forum >> Version 2 >>

merging XML tables to add records?

More information on this topic is available in the documentation section: /aw.xml.table/.

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(rootFromrootTotrue);

        
dataTable.setXML(currentXML);
};

req.request();
 
Hope it can help someone else...
MF
Tuesday, March 4, 2008

Post a reply:

Text:
Name:

Back to /aw.xml.table/

Documentation:

Forum search