Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 548507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:05:10+00:00 2026-05-13T11:05:10+00:00

I have to post data from my HTML form to server in xml format,

  • 0

I have to post data from my HTML form to server in xml format, something like:

<some_parameters>
    <firstname>Homer</firstname>
    <lastname>Simpson</lastname>
    <street>74 Evergreen Tr.</street>
</some_parameters>

All I know is it goes to one of the CRM applications run on different domain. Now I’m not sure what is the best way to do this.

I was thinking of just wrapping values of fields in my form when user submits the form. So if user typed “Homer” in “firstname” field and clicks submit, my JS would change the value of the field to <firstname>Homer</firstname> and then post the data.

If it helps I’m using jQuery on client side. I think there must be the better way as my solution would break with JS disabled and seems a bit dodgy so if you could point me in the right direction that would be awesome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:05:11+00:00Added an answer on May 13, 2026 at 11:05 am

    The best way I can think of is to intercept the form-submit action, and convert the form details into XML format, and then submit that to the server. There are many ways to do this, but the easiest would be to implement a solution via a framework like jQuery:

    An example of this very thing can be found online at http://www.docunext.com/…data-to-xml-with-jquery which utilizes the JSON to XML Plugin:

    $("#myform").submit(function(){
      var formjson = $('#myform').serializeArray();
      var formxml = json2xml(formjson);
      $.post("/collect.php", { 'data': formxml }, function(data){ 
        // callback logic
      });
      return false;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a AJAX post method that gets xml data from server. But when
I have this html form to pass my data from iphone to web server..
If have a html form like <form method=POST action=http://.../file.php> <input type=text name=data id=data />
Usually when I get POST data it's send from a HTML form and the
I have a simple HTML Form <form id=uploadForm method=post action=/cgi-bin/test.cgi enctype=multipart/form-data> <input type=submit name=add_something
I'm tying to send POST data from one site to another (both sites have
I have written a script that fires a jQuery POST to retrieve data from
I have this function in jQuery that gets data from a page with POST,
Possible Duplicate: Read Post Data submitted to ASP.Net Form I have a google checkout
I have a form on which I POST the data with PHP. When the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.