:: Forum >> Version 2 >>

XML sources - How to load many into one grid

I was just curious if there was a way to take many XML data sources and load them into 1 grid?

Each of the XML sources has the same tags - so, there wouldn't be a mismatch. They are just in chunks because of volume.
Carl
Sunday, February 12, 2006
well, you could make yourself a helper function that concatenates the xml from each of your data sources, wraps them all together under a root node, creates a new xml document from that result, then pass that into the xml table backing your grid.

I didn't actually test it, but the following IE pseudo-code should be close to workable. =)

function createXmlDocumentFromStrings() {
    var 
xmlString "<xml>";
    for (var 
0arguments.lengthi++) {
        
xmlString += arguments[i]; 
        
// or arguments[i].xml if passing in xml documents
    
}
    
xmlString += "</xml>";

    var 
xml = new ActiveXObject('MSXML2.DOMDocument');
    
xml.async false;
    
xml.loadXML(xmlString);
    return 
xml;
wombat
Sunday, February 12, 2006
Thanks a bunch ... I'll give it a shot and modify it as needed. It's really helpful.
Carl
Monday, February 13, 2006



This topic is archived.

Back to support forum

Forum search