# Sending XML from Javascript

**URL:** <https://discuss.rubyonrails.org/t/sending-xml-from-javascript/18671>\
**Category:** rubyonrails-talk\
**Created:** [September 28, 2007, 5:01pm UTC](https://discuss.rubyonrails.org/t/sending-xml-from-javascript/18671 "2007-09-28T17:01:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Griffin](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@Chris\_Griffin](https://discuss.rubyonrails.org/u/Chris_Griffin)\
**Post date:** [September 28, 2007, 5:01pm UTC](https://discuss.rubyonrails.org/t/sending-xml-from-javascript/18671/1 "2007-09-28T17:01:52Z")

</div>

I am using Ajax to send XML to an action in one of my controllers. In Firefox I can see that the XML is being sent. The Content-Type is text/ xml. This is the XML I am sending:

\<?xml version="1.0" encoding="UTF-8"?\> \<users\> &nbsp;&nbsp;\<user action="UPDATE" id="1"\> &nbsp;&nbsp;&nbsp;&nbsp;\<create\_date\>09/26/07\</create\_date\> &nbsp;&nbsp;&nbsp;&nbsp;\<first\_name\>Chris\</first\_name\> &nbsp;&nbsp;&nbsp;&nbsp;\<last\_name\>Griffin\</last\_name\> &nbsp;&nbsp;&nbsp;&nbsp;\<address\>123 Main St.\</address\> &nbsp;&nbsp;&nbsp;&nbsp;\<city\>Anytown\</city\> &nbsp;&nbsp;&nbsp;&nbsp;\<state\>MA\</state\> &nbsp;&nbsp;&nbsp;&nbsp;\<phone\>(201) 555-1234\</phone\> &nbsp;&nbsp;&nbsp;&nbsp;\<active\>true\</active\> &nbsp;&nbsp;\</user\> \</users\>

Looking at the request var. I can see that RAW\_POST\_DATA =\> "\<\<the

> > ". However it doesn't show up in params. The action is getting

called. Isn't rails supposed to recognize the XML and create a hash from it?
