formatting xml into a nice (ish) map