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?