Better check if it's an XMLWriter instance.