Implemented better xml helper functions.