35 """ |
37 """ |
36 Public method to write the XML to the file. |
38 Public method to write the XML to the file. |
37 """ |
39 """ |
38 XMLStreamWriterBase.writeXML(self) |
40 XMLStreamWriterBase.writeXML(self) |
39 |
41 |
40 self.writeDTD('<!DOCTYPE HighlightingStyles SYSTEM "HighlightingStyles-{0}.dtd">'\ |
42 self.writeDTD( |
41 .format(highlightingStylesFileFormatVersion)) |
43 '<!DOCTYPE HighlightingStyles SYSTEM' |
|
44 ' "HighlightingStyles-{0}.dtd">'.format( |
|
45 highlightingStylesFileFormatVersion)) |
42 |
46 |
43 # add some generation comments |
47 # add some generation comments |
44 self.writeComment(" Eric5 highlighting styles ") |
48 self.writeComment(" Eric5 highlighting styles ") |
45 self.writeComment(" Saved: {0}".format(time.strftime('%Y-%m-%d, %H:%M:%S'))) |
49 self.writeComment( |
|
50 " Saved: {0}".format(time.strftime('%Y-%m-%d, %H:%M:%S'))) |
46 self.writeComment(" Author: {0} ".format(self.email)) |
51 self.writeComment(" Author: {0} ".format(self.email)) |
47 |
52 |
48 # add the main tag |
53 # add the main tag |
49 self.writeStartElement("HighlightingStyles") |
54 self.writeStartElement("HighlightingStyles") |
50 self.writeAttribute("version", highlightingStylesFileFormatVersion) |
55 self.writeAttribute("version", highlightingStylesFileFormatVersion) |