fix defect #2 broken when attribute values contain spaces, andadd minro fix to support buffered comments