code: def write(self, fptr):
          
          read_buffer = ET.tostring(self.xml.getroot(), encoding='utf-8')
          fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
          fptr.write(read_buffer)
docs: Write an XML box to file.