MCPcopy Index your code
hub / github.com/STIXProject/python-stix / exportAttributes

Method exportAttributes

stix/bindings/incident.py:2389–2404  ·  view source on GitHub ↗
(self, lwrite, level, already_processed, namespace_='incident:', name_='Incident')

Source from the content-addressed store, hash-verified

2387 else:
2388 lwrite('/>%s' % (eol_, ))
2389 def exportAttributes(self, lwrite, level, already_processed, namespace_='incident:', name_='Incident'):
2390 super(IncidentType, self).exportAttributes(lwrite, level, already_processed, namespace_, name_='Incident')
2391# if 'xmlns' not in already_processed:
2392# already_processed.add('xmlns')
2393# xmlns = " xmlns:%s='%s'" % (self.xmlns_prefix, self.xmlns)
2394# lwrite(xmlns)
2395 if 'xsi:type' not in already_processed:
2396 already_processed.add('xsi:type')
2397 xsi_type = " xsi:type='%s:%s'" % (self.xmlns_prefix, self.xml_type)
2398 lwrite(xsi_type)
2399 if self.URL is not None and 'URL' not in already_processed:
2400 already_processed.add('URL')
2401 lwrite(' URL=%s' % (quote_attrib(self.URL), ))
2402 if self.version is not None and 'version' not in already_processed:
2403 already_processed.add('version')
2404 lwrite(' version=%s' % (quote_attrib(self.version), ))
2405 def exportChildren(self, lwrite, level, nsmap, namespace_=XML_NS, name_='IncidentType', fromsubclass_=False, pretty_print=True):
2406 super(IncidentType, self).exportChildren(lwrite, level, nsmap, namespace_, name_, True, pretty_print=pretty_print)
2407 if pretty_print:

Callers 1

exportMethod · 0.95

Calls 2

exportAttributesMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected