Hi So I have a function that outputs an xml string that goes something like
<expensesAC>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
</expensesAC>
Now, I have a view called genxml.xml.erb, and a redirect to mysite.com:3000/genxml.xml
I need this because flex requires an xml file to be passed. However, what I end up getting is
<body>
<expensesAC>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
</expensesAC>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
<cashflow>
<month>6</month>
<cash>300</cash>
<projected>null</projected>
</cashflow>
</body>
So basically rails forces my xml string to be html.
How do I generate a dynamic xml page using my string? Like, how do I turn my xml string into an xml page, dynamically generated? I don't want to create static files -- these files need to be generated on the fly because the data in the xml sets will be private information for each user.