Few helper functions for parsing XML files.