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

Method export

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

Source from the content-addressed store, hash-verified

1350 else:
1351 return False
1352 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='HistoryType', namespacedef_='', pretty_print=True):
1353 if pretty_print:
1354 eol_ = '\n'
1355 else:
1356 eol_ = ''
1357 showIndent(lwrite, level, pretty_print)
1358 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
1359 already_processed = set()
1360 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='HistoryType')
1361 if self.hasContent_():
1362 lwrite('>%s' % (eol_, ))
1363 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
1364 showIndent(lwrite, level, pretty_print)
1365 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
1366 else:
1367 lwrite('/>%s' % (eol_, ))
1368 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='HistoryType'):
1369 pass
1370 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='HistoryType', 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