Going from Table to XML file

I can't seem to find any info on going from grid to saving XML file.
Would I have to make a function to read each node on the grid, and put the <quoteNum> nodefromgird </quoteNum> around each line, or is there an easier way to do this?
September 3,
If you use the editable cell template like described here:


- the XML data will be updated automatically thanks to the table.setText() method. But you still have to serialise the XML and send back to the server somehow.
Alex (ActiveWidgets)
September 3,
I just made this function, which a button calls it.

<script type="text/javascript">

  var dumpXML = function(){
     var dumptemp = "<root> \n";

     for (i = 0; i <=table.getCount(); i++){
    if (table.getText(i, 10) == "C") {
    dumptemp += "<QuoteFeedback OrderInfo='" + table.getText(i,4) + "'"	+ " OrderDate='" + table.getText(i,5) + "'" + " OrderStatus='" + table.getText(i,6) + "'" + " LostOrderCode='" + table.getText(i,7) + "'" + " CompetitorCode='" + table.getText(i,8) + "'"	+ " Comments='" + table.getText(i,9) + "'" + "/> \n";
    dumptemp += "</root>"
    document.getElementById("debugConsole1").value = dumptemp;


So my debug console will look like the XML file. (Just so i can visually see it, I will take out the debug console when I finish the project. And from there, I just send the 'dumptemp' to an URL template and off she goes.

I just wanted to know if I had to make up the function (like I did above, or if there was a commmand like

var newXML = table.returnValues

But from the looks of things, the function is good enough for what I need.
September 3,
You can try

var xml = table.getXML();

to get access to XML object.
Alex (ActiveWidgets)
September 3,
All that returns is


What can I do with that?
September 9,
My first way, looks like its doing the trick, unless there is an easier way, but all and all, it's alright.

To populate select boxes from an XML file, would you first load the XML file into a table, and then do the....

.addOption( "table.getText(1,1)", "table.getText(1,0)");

September 9,
Is there a way to loop until the xml grid is finished loading?
If I make a button and put the .addOption codes in there, it works fine, because by the time I go and click the button, the xml data is loaded.

But I don't want the user to click a button evertime the page gets loaded.
September 20,
I know this would be one chessy way of doing it.. but what if you put all of the .addOptions into a function, then called it with..

obj.setAction("click", clickaction);

and within your function, make a boolean varible, so it only loads the function once.
September 20,
I don't want the user to click on the grid first, and then click on the dropdown boxes.

It would be nice if the grid waited for the dropdown talbes to load first, before it will display. Is it something to do with the table.request ?
September 27,

hai I need the the proper code for display the xml file using jsp.

how can i do it ?

I have one table. ex. employee.xml I have to display this xml file in jsp. kindly send
the code in apandianmca@yahoo.com. Please.......
November 30,

This topic is archived.

See also:

Back to support forum