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

Method export

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

Source from the content-addressed store, hash-verified

673 else:
674 return False
675 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitsType', namespacedef_='', pretty_print=True):
676 if pretty_print:
677 eol_ = '\n'
678 else:
679 eol_ = ''
680 showIndent(lwrite, level, pretty_print)
681 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
682 already_processed = set()
683 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='ExploitsType')
684 if self.hasContent_():
685 lwrite('>%s' % (eol_, ))
686 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
687 showIndent(lwrite, level, pretty_print)
688 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
689 else:
690 lwrite('/>%s' % (eol_, ))
691 def exportAttributes(self, lwrite, level, already_processed, namespace_='ttp:', name_='ExploitsType'):
692 pass
693 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitsType', 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