My XML parser routines throw a fatal error on encountering the NULL character at the end of my XML file. The nest thing is that the parser wrote that character into the file in the first place!!! ***?

Anybody know how / why / what to do?

An unrelated point - has anyone been able to get the 'put_encoding' method of the XML writer to work properly? I had to hardcode-hack my XML declaration into the file...