I'm trying to aggregate data from a number of different xml sources into a single xml file using either JavaScript or jQuery. I'm looping over the files, using jquery $.Ajax to read the file, and am selecting the first node (the node I want) and want to copy and append it to my destination xml file, then move on.
I can select the first row using:
firstRow = $(testThis.responseXML).find("z\\:row:eq(0)"); // get the first row
alert('firstRow : ' + firstRow ); // check the node text
But I can't seem to copy the node and append it. I'm trying to use:
newXMLData.append($(firstRow).text()); // append row to new xml file
I've tried using .text(), .HTML(), .val() but nothing seems to work.
Any ideas?