How to convert all form data to xml, then send xml to server?

How to convert all form data to xml, then send xml to server?

I have a standard ASP web form like this:

  1. <asp:Content ID="Content8" ContentPlaceHolderID="MainContent" runat="server"> <fieldset> <asp:Label ID="lblFirstName" runat="server" Text="First Name:"></asp:Label> <asp:TextBox ID="tctFirstName" runat="server"></asp:TextBox> <asp:Label ID="lblLastName" runat="server" Text="Last Name:"></asp:Label> <asp:TextBox ID="txtLastName" runat="server"></asp:TextBox> <asp:Label ID="lblEmail" runat="server" Text="E-Mail:"></asp:Label> <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox> <asp:Label ID="lblPhone" runat="server" Text="Phone Number:"></asp:Label> <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox> <asp:Button ID="btnSubmit" runat="server" Text="Submit" /> </fieldset> </asp:Content>

I saw a post does the work: How to post XML to server thru HTML form?

Here is the code:

  1. $("#myform").submit(function(){ var formjson = $('#myform').serializeArray(); var formxml = json2xml(formjson); $.post("/collect.php", { 'data': formxml }, function(data){ // callback logic }); return false; });
The result I got is already empty for 'serializeArray()'. 
So my question is: 
1. how this jQuery code works with 'ContentPlaceHolder' instead of 'form'? 
2. Does this jQuery code work with standard ASP control fields, or it has to be HTML field? 

Thanks in advance.