(self, outfile, encoding)
| 296 | content_type = "application/rss+xml; charset=utf-8" |
| 297 | |
| 298 | def write(self, outfile, encoding): |
| 299 | handler = SimplerXMLGenerator(outfile, encoding, short_empty_elements=True) |
| 300 | handler.startDocument() |
| 301 | # Any stylesheet must come after the start of the document but before |
| 302 | # any tag. https://www.w3.org/Style/styling-XML.en.html |
| 303 | self.add_stylesheets(handler) |
| 304 | handler.startElement("rss", self.rss_attributes()) |
| 305 | handler.startElement("channel", self.root_attributes()) |
| 306 | self.add_root_elements(handler) |
| 307 | self.write_items(handler) |
| 308 | self.endChannelElement(handler) |
| 309 | handler.endElement("rss") |
| 310 | |
| 311 | def rss_attributes(self): |
| 312 | return { |
no test coverage detected