On Wed, 5 May 2010 11:55:59 +0800, zhang yikai <yikaikai at gmail.com> wrote: >what wrong with my code? Easy. You've provided no way to exit the do/while loop without an error. So when expat is done, it tries again and fails. HTH! -- Jeremy H. Griffith, at Omni Systems Inc. <jeremy at omsys.com> http://www.omsys.com/