Hi ShosMeister
Maybe some good folks at either site below could help you construct your script.
I serached for "parse" on both sites which came up with quite a few ideas.
http://discussions.apple.com/forum.jspa?forumID=724
http://bbs.applescript.net/viewforum.php?id=2
Budgie