Lines Matching refs:file

532     *file* is an optional file handle or file name of an XML file whose
536 def __init__(self, element=None, file=None):
539 if file:
540 self.parse(file)
559 *source* is a file name or file object, *parser* is an optional parser
699 """Write element tree to a file as XML.
702 *file_or_filename* -- file name or a file object opened for writing
746 def write_c14n(self, file):
748 return self.write(file, method="c14n")
759 # file_or_filename is a file name
763 errors="xmlcharrefreplace") as file:
764 yield file.write, encoding
766 # file_or_filename is a file-like object
775 file = file_or_filename
777 file = io.BufferedWriter(file_or_filename)
778 # Keep the original file open when the BufferedWriter is
780 stack.callback(file.detach)
784 file = io.BufferedIOBase()
785 file.writable = lambda: True
786 file.write = write
790 file.seekable = file_or_filename.seekable
791 file.tell = file_or_filename.tell
794 file = io.TextIOWrapper(file,
798 # Keep the original file open when the TextIOWrapper is
800 stack.callback(file.detach)
801 yield file.write, encoding
1051 # which take part of organizing file into lines. Within attributes,
1142 ordinary XML file.
1211 *source* is a filename or file object containing XML data,
1231 *source* is a filename or file object containing XML data, *events* is
1511 which if given, overrides the encoding specified in the XML file:
1737 If *out* is provided, it must be a file or file-like object that receives
1739 method. To write to a file, open it in text mode with encoding "utf-8".
1742 Either *xml_data* (an XML string) or *from_file* (a file path or
1743 file-like object) must be provided as input.
1774 as text (not bytes). To write to a file, open it in text mode with encoding