(self, lwrite, level, nsmap, namespace_=XML_NS, name_='MalwareInstanceType', namespacedef_='', pretty_print=True)
| 239 | else: |
| 240 | return False |
| 241 | def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='MalwareInstanceType', namespacedef_='', pretty_print=True): |
| 242 | if pretty_print: |
| 243 | eol_ = '\n' |
| 244 | else: |
| 245 | eol_ = '' |
| 246 | showIndent(lwrite, level, pretty_print) |
| 247 | lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', )) |
| 248 | already_processed = set() |
| 249 | self.exportAttributes(lwrite, level, already_processed, namespace_, name_='MalwareInstanceType') |
| 250 | if self.hasContent_(): |
| 251 | lwrite('>%s' % (eol_, )) |
| 252 | self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print) |
| 253 | showIndent(lwrite, level, pretty_print) |
| 254 | lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_)) |
| 255 | else: |
| 256 | lwrite('/>%s' % (eol_, )) |
| 257 | def exportAttributes(self, lwrite, level, already_processed, namespace_='ttp:', name_='MalwareInstanceType'): |
| 258 | if self.idref is not None and 'idref' not in already_processed: |
| 259 | already_processed.add('idref') |
nothing calls this directly
no test coverage detected