Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery .append() case sensitive element

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.

like image 664
m3div0 Avatar asked Dec 09 '22 22:12

m3div0


1 Answers

Try using $.parseXML() to create the XML element:

yourObject.append($.parseXML("<EDO />").documentElement);
like image 76
Frédéric Hamidi Avatar answered Dec 11 '22 11:12

Frédéric Hamidi