How to parse incoming parameters from POST operation

Hi,

I’m currently building an application to accept and process email posts
(killmails). I’ve built the form (a simple textarea) where you can input
the kllmail and post it to the website but I’m hitting a problem on the
controller side where I want to actually process the killmail.

Example killmails:
http://www.temporaryfixture.net/killmail1.txt
http://www.temporaryfixture.net/killmail2.txt

I’m now trying to work out how to parse the emails to get the details I
need. I have tables for everything the killmail contains (pilots, corps,
alliances, systems etc) but I can’t see how to proceed with the parsing.
My Helper class contains the method “parse_killmail” but I can’t seem to
call that within the controller class anywhere.

Should I opt for RegEx matching to the details or should I try and build
some sort of XML reognition?

If anyone has any pointers on what I should do to get started with this
I’d be grateful! As this is the crux of the application I can’t do
anything until this is sorted :frowning:

Thanks
George

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs