[Rails] Re: Rails magic for MySQL -> XML file -> MySQL and back
again
Stef T
stef at ummon.com
Wed Aug 9 04:11:19 GMT 2006
Hey Tony,
Sorry to jump into your thread un-invited, but, getting information
from a Rails application, loading 'into' it an xml document from
'intranet' .. call me crazy (ishmael) but, doesn't this scream XMLRPC ?
XMLRPC methods should be fairly easy to knock up to export a record
and/or update from the database in conjunction with AR. Jst a thought,
feel free to ignore it as you feel appropiate :)
Regards
Stef
Tony Martin wrote:
> Bill,
>
> this thread seems to have stopped, but I wonder how far you got with your
> application. I have been googling for some time now and the information on
> handling xml files in rails is sparse. (To be fair, rails is aimed at
> database apps.) .
>
> I wanted to do something very much along the same lines, although not
> quite so complex as your requirement. After entering data into tables, I
> want to save the summary (an order with customer detailsm and order
> information) in fairly simple xml format on the (intanet) server where it
> can be separately accessed as required. Then I want to allow the user to
> reload the xml file at a later date, be able to modify it and save it back.
>
> If you had any helpful examples, I would be most grateful. I am not an
> xml or xslt expert, but I need to grapple with this. I have done some xml
> file handling/editing in php, but managing something similar from rails does
> not seem to be quite so obvious.
>
> Once I have my xml file, I thought I could build an xslt to allow it to be
> later viewed in a browser. And I am also thinking towards providing the
> ability to import it into OpenOffice for off line editing.
>
> I would be grateful for any useful links or advice you might be able to
> offer.
>
> Tony
>
>
>
> Bill Walton wrote:
>
>> Hi Danny,
>>
>> Danny Malone wrote:
>>
>>> Bill Walton wrote:
>>>
>>>
>>>> My little app collects data from the user, persists it in about a dozen
>>>> tables during the session, writes out / saves an XML file that's
>>>> downloaded to the user's PC when they're done, then clears the db of all
>>>> data entered, and deletes the XML file from the server.
>>>>
>>>> Now I need to allow the user to upload the same XML file they created
>>>> earlier and put it back in the database so that, using the same app they
>>>> used to create it, they can edit / update it and save / download it to
>>>> their PC again.
>>>>
>>>> Can somebody point me in the right direction here, please? What's the
>>>> Rails way of approaching this? Is there some way to 'bind' (don't know
>>>> if that's the right word here) the XML file to the db? Some Rails
>>>> magic, maybe?
>>>>
>>> Not to sure of Rails magic but you could use an xslt stylesheet to
>>> transformt he xml into an sql insert query then run that to populate the
>>> db.
>>>
>> Thanks for the suggestion! Any example / tutorial links you could point
>> me
>> to?
>>
>> Best regards,
>> Bill
>>
>> _______________________________________________
>> Rails mailing list
>> Rails at lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>>
More information about the Rails
mailing list