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 1068195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:15:19+00:00 2026-05-16T20:15:19+00:00

I am accessing a certain web service API which requires XML data in the

  • 0

I am accessing a certain web service API which requires XML data in the request. For example, the API might be expecting:

<?xml version="1.0" encoding="utf-8" ?>

<root>
    <a>1</a>
    <b>2</b>
</root>

What’s the easiest way to build that XML request, possibly using jQuery? Is there any standard serializer that I can use to build a JS object and serialize it to XML? What’s the idiomatic way to do this?

  • 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-16T20:15:19+00:00Added an answer on May 16, 2026 at 8:15 pm

    One option I found (which I am currently using, pending no better option) is the json2xml plugin for jQuery.

    Example usage:

    var xmlHead = '<?xml version="1.0" encoding="utf-8" ?>';
    
    var j = {
        a : '1',
        b : 'B',
        c : {
          m : 'm'
        }
    };
    
    var opts = {
      rootTagName : 'myRoot',
      nodes : ['a', 'b', 'c']
    };
    
    var xml = $.json2xml(j, opts);
    var xmlData = xmlHead + xml;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at having certain users access one database and other users accessing another
While accessing a webservice which is availbale at http://recpushdata.cyndigo.com/jobs.asmx , I am getting this
A user is accessing a restricted web application with JAAS (on Glassfish 2.1). LDAPRealm
anybody knows of blocking certain users (by IP) from accessing your website (website on
I'm trying to think of how to validate that a web service is only
For a class assignment, we are writing a custom syscall which pulls certain information
In accessing PDH.dll (a Win32 API) (see link) using P/Invoke , it turns out
Is accessing a bool field atomic in C#? In particular, do I need to
When accessing an object in a DataTable retrieved from a database, are there any
When accessing values from an SqlDataReader is there a performance difference between these two:

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.