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

Method exportAttributes

stix/bindings/ttp.py:1370–1382  ·  view source on GitHub ↗
(self, lwrite, level, already_processed, namespace_='ttp:', name_='TTP')

Source from the content-addressed store, hash-verified

1368 else:
1369 lwrite('/>%s' % (eol_, ))
1370 def exportAttributes(self, lwrite, level, already_processed, namespace_='ttp:', name_='TTP'):
1371 super(TTPType, self).exportAttributes(lwrite, level, already_processed, namespace_, name_='TTP')
1372 #if 'xmlns' not in already_processed:
1373 # already_processed.add('xmlns')
1374 # xmlns = " xmlns:%s='%s'" % (self.xmlns_prefix, self.xmlns)
1375 # lwrite(xmlns)
1376 if 'xsi:type' not in already_processed:
1377 already_processed.add('xsi:type')
1378 xsi_type = " xsi:type='%s:%s'" % (self.xmlns_prefix, self.xml_type)
1379 lwrite(xsi_type)
1380 if self.version is not None and 'version' not in already_processed:
1381 already_processed.add('version')
1382 lwrite(' version=%s' % (quote_attrib(self.version), ))
1383 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='TTPType', fromsubclass_=False, pretty_print=True):
1384 super(TTPType, self).exportChildren(lwrite, level, nsmap, namespace_, name_, True, pretty_print=pretty_print)
1385 if pretty_print:

Callers 3

exportMethod · 0.95
exportAttributesMethod · 0.45
exportAttributesMethod · 0.45

Calls 1

addMethod · 0.45

Tested by

no test coverage detected