Fixed the streaming xml writer

See https://bugs.launchpad.net/oq-nrmllib/+bug/1227605