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

Method export

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

Source from the content-addressed store, hash-verified

806 else:
807 return False
808 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='AttackPatternsType', namespacedef_='', pretty_print=True):
809 if pretty_print:
810 eol_ = '\n'
811 else:
812 eol_ = ''
813 showIndent(lwrite, level, pretty_print)
814 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
815 already_processed = set()
816 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='AttackPatternsType')
817 if self.hasContent_():
818 lwrite('>%s' % (eol_, ))
819 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
820 showIndent(lwrite, level, pretty_print)
821 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
822 else:
823 lwrite('/>%s' % (eol_, ))
824 def exportAttributes(self, lwrite, level, already_processed, namespace_='ttp:', name_='AttackPatternsType'):
825 pass
826 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='AttackPatternsType', 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