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

Method export

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

Source from the content-addressed store, hash-verified

2043 else:
2044 return False
2045 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='RelatedIncidentsType', namespacedef_='', pretty_print=True):
2046 if pretty_print:
2047 eol_ = '\n'
2048 else:
2049 eol_ = ''
2050 showIndent(lwrite, level, pretty_print)
2051 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
2052 already_processed = set()
2053 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='RelatedIncidentsType')
2054 if self.hasContent_():
2055 lwrite('>%s' % (eol_, ))
2056 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
2057 showIndent(lwrite, level, pretty_print)
2058 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
2059 else:
2060 lwrite('/>%s' % (eol_, ))
2061 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='RelatedIncidentsType'):
2062 super(RelatedIncidentsType, self).exportAttributes(lwrite, level, already_processed, namespace_, name_='RelatedIncidentsType')
2063 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='RelatedIncidentsType', 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