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

Method export

stix/bindings/ttp.py:1518–1533  ·  view source on GitHub ↗
(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitTargetsType', namespacedef_='', pretty_print=True)

Source from the content-addressed store, hash-verified

1516 else:
1517 return False
1518 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitTargetsType', namespacedef_='', pretty_print=True):
1519 if pretty_print:
1520 eol_ = '\n'
1521 else:
1522 eol_ = ''
1523 showIndent(lwrite, level, pretty_print)
1524 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
1525 already_processed = set()
1526 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='ExploitTargetsType')
1527 if self.hasContent_():
1528 lwrite('>%s' % (eol_, ))
1529 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
1530 showIndent(lwrite, level, pretty_print)
1531 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
1532 else:
1533 lwrite('/>%s' % (eol_, ))
1534 def exportAttributes(self, lwrite, level, already_processed, namespace_='ttp:', name_='ExploitTargetsType'):
1535 super(ExploitTargetsType, self).exportAttributes(lwrite, level, already_processed, namespace_, name_)
1536 pass

Callers

nothing calls this directly

Calls 3

exportAttributesMethod · 0.95
hasContent_Method · 0.95
exportChildrenMethod · 0.95

Tested by

no test coverage detected