update to version with less globals for xmlwriter;