Added xml exporter; related changes elsewhere.