Ugly hack for supporting xml

Don't merge this please, it's for Kneaver only at this stage