Started to implement XML loading. not yet tested.