Added functions to load XML from resources.