def getElementText(self, node, preserve_ws=None):
result = []<EOL>for child in node.childNodes:<EOL><INDENT>nodetype = child.nodeType<EOL>if nodetype == child.TEXT_NODE ornodetype == child.CDATA_SECTION_NODE:<EOL><INDENT>result.append(child.nodeValue)<EOL><DEDENT><DEDENT>value = join(result, '<STR_LIT>')<EOL>if preserve_ws is None:<EOL><INDENT>value = strip(value)<EOL><DEDENT>return value<EOL>
Return the text value of an xml element node. Leading and trailing
           whitespace is stripped from the value unless the preserve_ws flag
           is passed with a true value.