Hi I need to create xml from data in form to send it to webservice. The problem is that .append() is case insensitive, so .append('<EDO />') will create <edo>. But xml is case sensitive, so is there a way how to solve this? And I’ve chosen to use domObject instead of string, because this way I don’t have to write endtags, what would be very difficult in my scenario.
Hi I need to create xml from data in form to send it to
Share
Finally as @Frédéric Hamidi said, to make case sensitive xml I used these functions:
var domA = $.parseXML("<EDO_A />").documentElement;to create element$(domA ).append($.parseXML('<EDO_Child />').documentElement);to add child from string$(domA).append(domB)ordomA.appendChild(domB)to add child object