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

Method export

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

Source from the content-addressed store, hash-verified

969 else:
970 return False
971 def export(self, lwrite, level, nsmap, namespace_=XML_NS, name_='TotalLossEstimationType', namespacedef_='', pretty_print=True):
972 if pretty_print:
973 eol_ = '\n'
974 else:
975 eol_ = ''
976 showIndent(lwrite, level, pretty_print)
977 lwrite('<%s:%s%s' % (nsmap[namespace_], name_, namespacedef_ and ' ' + namespacedef_ or '', ))
978 already_processed = set()
979 self.exportAttributes(lwrite, level, already_processed, namespace_, name_='TotalLossEstimationType')
980 if self.hasContent_():
981 lwrite('>%s' % (eol_, ))
982 self.exportChildren(lwrite, level + 1, nsmap, XML_NS, name_, pretty_print=pretty_print)
983 showIndent(lwrite, level, pretty_print)
984 lwrite('</%s:%s>%s' % (nsmap[namespace_], name_, eol_))
985 else:
986 lwrite('/>%s' % (eol_, ))
987 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='TotalLossEstimationType'):
988 pass
989 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='TotalLossEstimationType', 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