#NEWLINE# @ staticmethod #NEWLINE# def _build( _type , tag , msg , xml ) : #NEWLINE# #INDENT# ' Create HTTP response ' #NEWLINE# response = ET . Element ( 'response' ) #NEWLINE# if _type : #NEWLINE# #INDENT# response . set ( 'type' , _type ) #NEWLINE# #UNINDENT# msgtag = ET . Element ( tag ) #NEWLINE# if msg : #NEWLINE# #INDENT# msgtag . text = msg #NEWLINE# #UNINDENT# response . append ( msgtag ) #NEWLINE# if ( xml is not None ) : #NEWLINE# #INDENT# response . append ( xml ) #NEWLINE# #UNINDENT# return ET . tostring ( response )