Some work on XML export