title: passing xml using curl with two models in rails
body: <p>I want to pass this through curl:</p>
  
  <pre><code>&lt;invoice&gt;
  .....
  &lt;invoice-details&gt;
  &lt;invoice-detail&gt;
  ....
  &lt;/invoice-detail&gt;
  &lt;invoice-detail&gt;
  ....
  &lt;/invoice-detail&gt;
  &lt;/invoice_details&gt;
  &lt;/invoice&gt;
  </code></pre>
  
  <p>I have two models, invoice and invoice_detail, which are associated, by the way. I have a primary key for the invoice to be passed to all the invoice_details so i can id them. for example, if the primary key is 200, i want all the details below that invoice to have a foreign key of 200, too. How am i gonna be able to achieve this? Thanks a lot.</p>