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