halfway through trying to remove dependency from xml stuff. with only
partial success at the mo...