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

Method exportChildren

stix/bindings/ttp.py:398–409  ·  view source on GitHub ↗
(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitType', fromsubclass_=False, pretty_print=True)

Source from the content-addressed store, hash-verified

396 already_processed.add('id')
397 lwrite(' id=%s' % (quote_attrib(self.id), ))
398 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='ExploitType', fromsubclass_=False, pretty_print=True):
399 if pretty_print:
400 eol_ = '\n'
401 else:
402 eol_ = ''
403 if self.Title is not None:
404 showIndent(lwrite, level, pretty_print)
405 lwrite('<%s:Title>%s</%s:Title>%s' % (nsmap[namespace_], quote_xml(self.Title), nsmap[namespace_], eol_))
406 for Description in self.Description:
407 Description.export(lwrite, level, nsmap, namespace_, name_='Description', pretty_print=pretty_print)
408 for Short_Description in self.Short_Description:
409 Short_Description.export(lwrite, level, nsmap, namespace_, name_='Short_Description', pretty_print=pretty_print)
410 def build(self, node):
411 self.__sourcenode__ = node
412 already_processed = set()

Callers 1

exportMethod · 0.95

Calls 1

exportMethod · 0.45

Tested by

no test coverage detected