Imported code from xml library