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

Method buildAttributes

stix/bindings/ttp.py:417–425  ·  view source on GitHub ↗
(self, node, attrs, already_processed)

Source from the content-addressed store, hash-verified

415 nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
416 self.buildChildren(child, node, nodeName_)
417 def buildAttributes(self, node, attrs, already_processed):
418 value = find_attr_value_('idref', node)
419 if value is not None and 'idref' not in already_processed:
420 already_processed.add('idref')
421 self.idref = value
422 value = find_attr_value_('id', node)
423 if value is not None and 'id' not in already_processed:
424 already_processed.add('id')
425 self.id = value
426 def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
427 if nodeName_ == 'Title':
428 Title_ = child_.text

Callers 1

buildMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected