Exemple #1
0
    def parse_xml_node(self, node):
        '''Parse an xml.dom Node object representing a participant into this
        object.

        '''
        if node.getElementsByTagNameNS(RTS_NS, 'Participant').length != 1:
            raise InvalidParticipantNodeError
        self.target_component = TargetComponent().parse_xml_node(\
                node.getElementsByTagNameNS(RTS_NS, 'Participant')[0])
        return self
Exemple #2
0
 def parse_yaml_node(self, y):
     '''Parse a YAML specification of a participant into this object.'''
     if 'participant' not in y:
         raise InvalidParticipantNodeError
     self.target_component = TargetComponent().parse_yaml_node(y['participant'])
     return self