Really simple JSON and XML parsing, ripped from Merb and Rails.