I have an xml string that wanted to be sent to server:
<script type="text/javascript">
$(document).ready(function() {
// put all your jQuery goodness in here.
$('#button').click(function() {
$.post('http://localhost/a.bc', { cmd:"<cmd cmd_name='login_user'><login_user user_name='binc1' password='pp'/></cmd>"}, function(data) {
alert(data);
$('.result').html(data);
});
});
});
</script>
The white space inside the xml is replaced to '+' when server got it. Is it possible that I can escape the xml by myself before use $.post so that it will send the escaped version to server. I can unescape the string in the server side.
Or even better, can I send pure XML to server without any escape/unescape dirty things?