MCPcopy Create free account
hub / github.com/STIXProject/python-stix / export

Method export

stix/bindings/incident.py:830–845  ·  view source on GitHub ↗
(self, lwrite, level, nsmap, namespace_=XML_NS, name_='COATimeType', namespacedef_='', pretty_print=True)

Source from the content-addressed store, hash-verified

828 else:
829 return False
830 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='COATimeType', namespacedef_='', pretty_print=True):
831 if pretty_print:
832 eol_ = '\n'
833 else:
834 eol_ = ''
835 showIndent(lwrite, level, pretty_print)
836 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
837 already_processed = set()
838 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='COATimeType')
839 if self.hasContent_():
840 lwrite('>%s' % (eol_, ))
841 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
842 showIndent(lwrite, level, pretty_print)
843 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
844 else:
845 lwrite('/>%s' % (eol_, ))
846 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='COATimeType'):
847 pass
848 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='COATimeType', fromsubclass_=False, pretty_print=True):

Callers

nothing calls this directly

Calls 3

exportAttributesMethod · 0.95
hasContent_Method · 0.95
exportChildrenMethod · 0.95

Tested by

no test coverage detected