Does one of the mainstream JavaScript libraries (YUI, jQuery, Dojo) provide a way to serialize a JavaScript object to XML (as text)?
                +2 
                A: 
                
                
              Have you considered using JSON instead of XML?
Anyway, someone posted this link in a similar question. it might offer what you want.
                  Nadia Alramli
                   2009-05-08 00:32:15
                
              Nadia, my goal is to have the data in XML format on the server. So I can use JSON, but I will then need to convert it to XML on the server.
                  Alessandro Vernet
                   2009-05-11 21:20:48
                Did you find a solution in the links I gave you?
                  Nadia Alramli
                   2009-05-11 21:43:42
                Links are good. http://goessner.net/download/prj/jsonxml/
                  Nosredna
                   2009-07-31 04:05:06
                Nadia, yes, I tried the code from Mirek Rusin you are linking to, and it had a few limitations, but overall did the job. Thank you for sharing, and apologies for the late response on my side!
                  Alessandro Vernet
                   2009-11-11 04:54:19
                @Nadia, unfortunately the link to Mirek Rusin's code now requires a password.
                  LarsH
                   2010-09-27 18:27:47