SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: XMLSerializer()

  1. #1
    SitePoint Member
    Join Date
    May 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XMLSerializer()

    Hi Guys, I had some JavaScript written to help with getting an xml document into a form field. The code is below. Works in all browsers except IE and Safari (Safari not tested on Mac)

    I think the problem is related to XMLSerializer. I have have had a go at fixing it but cant, the chap who creatyed the code is mad busy. Would anyone be able to point me in the right direction.

    The code which I think is the problem is below.

    Many thanks

    Jon

    Code:
    //get the quotes xml only
    
    var $quote = $(msg).find("Quotes"); 
    var quoteXml = "";
    //loop each element
    $.each($quote, function (index) {
    //append to local variable
    quoteXml += (new XMLSerializer()).serializeToString($quote[index]);
    });
                                                                                                                    
     //assign to form hidden field
    Last edited by spikeZ; Dec 18, 2013 at 03:18. Reason: Added [code] tags

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    8 Thread(s)
    Hi there,

    Welcome to the forums

    I'm afraid you haven't provided enough information for us to help you.

    Could you post enough code for me to run on my PC and reproduce your issue (this will include some XML, too)

    Here's are some tips on how to do this.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •