Fixed error with XML writer definition