def node_contents_str(tag):
if not tag:<EOL><INDENT>return None<EOL><DEDENT>tag_string = '<STR_LIT>'<EOL>for child_tag in tag.children:<EOL><INDENT>if isinstance(child_tag, Comment):<EOL><INDENT>tag_string += '<STR_LIT>' % unicode_value(child_tag)<EOL><DEDENT>else:<EOL><INDENT>tag_string += unicode_value(child_tag)<EOL><DEDENT><DEDENT>return tag_string if tag_string != '<STR_LIT>' else None<EOL>
Return the contents of a tag, including it's children, as a string.
Does not include the root/parent of the tag.