Bug 914618 - Reimplement XML pretty printing with events. r=smaug