#NEWLINE# @ staticmethod #NEWLINE# def from_xml( node ) : #NEWLINE# #INDENT# data = node . get ( 'name' , None ) #NEWLINE# name = CDATActionNode . convert_from_str ( data , 'str' ) #NEWLINE# data = node . get ( 'type' , None ) #NEWLINE# type = CDATActionNode . convert_from_str ( data , 'str' ) #NEWLINE# options = [ ] #NEWLINE# inputs = [ ] #NEWLINE# outputs = [ ] #NEWLINE# for child in node . getchildren ( ) : #NEWLINE# #INDENT# if ( child . tag == 'options' ) : #NEWLINE# #INDENT# for optnode in child . getchildren ( ) : #NEWLINE# #INDENT# option = CDATOptionNode . from_xml ( optnode ) #NEWLINE# options . append ( option ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( child . tag == 'input' ) : #NEWLINE# #INDENT# for inode in child . getchildren ( ) : #NEWLINE# #INDENT# port = CDATPortNode . from_xml ( inode ) #NEWLINE# inputs . insert ( port . _position , port ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( child . tag == 'output' ) : #NEWLINE# #INDENT# for onode in child . getchildren ( ) : #NEWLINE# #INDENT# port = CDATPortNode . from_xml ( onode ) #NEWLINE# outputs . insert ( data . _position , port ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( child . tag == 'doc' ) : #NEWLINE# #INDENT# doc = child . text #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return CDATAction ( name = name , type = type , options = options , inputs = inputs , outputs = outputs , doc = doc )