xmlfactory: Improve constness of parse