0

My question is regarding xml generating question.

How can I change the tag name from "row" to another name ?

Thank's In Advance.

Community
  • 1
  • 1
user590586
  • 2,960
  • 16
  • 63
  • 96

1 Answers1

0

It seems me prity simple. You can just modify the code of MyExportToXml to about following

var MyExportToXml = function (grid) {
    var dataFromGrid={gridRow:grid.jqGrid('getGridParam','data')};
    var xmldata='<?xml version="1.0" encoding="utf-8" standalone="yes"?>\n<myRows>\n'+
                xmlJsonClass.json2xml (dataFromGrid, '\t') + '</myRows>';
    alert(xmldata);
};

then you will have <gridRow> elements instead of <row>. See the corresponding demo here.

Oleg
  • 220,925
  • 34
  • 403
  • 798