Retrieve data from XML file and put in some form fields with jQuery

Hello,
I have a form (“index.htm”) like in ex. 1 and a XML file (“templates.xml”) like in ex.2.


ex. 1
<select name="Template" id="Template">
	<option value="">Please select...</option>
	<option value="first">Load first template</option>
	<option value="second">Load second template</option>
</select>
<input name="Subject" type="text" id="Subject" />
<textarea name="Body" id="Body"></textarea>

ex. 2
<?xml version="1.0" encoding="utf-8"?>
<templates>
	<template id="first">
		<subject>My first subject</subject>
		<body>This is the first body</body>
	</template>
	<template id="second">
		<subject>My second subject</subject>
		<body>This is the second body</body>
	</template>
</templates>

On change of select “Template” I’d like to retrieve data from XML file and put in “Subject” textfield and “Body” textarea (sort of “pre-filling” them), based on the option of “Template” select

I.e, if I choose option with value=“first”, I’d like to fill “Subject” field with “My first subject” and “Body” textarea with “This is the first body”. In the same way, if I choose option with value=“second”, I’d like to fill “Subject” field with “My second subject” and “Body” textarea with “This is the second body”, and so on

Of course, if no selection is done, both “Subject” and “Body” fields should be empty…
How to do this with jQuery and AJAX, please?