Is there some function in python for joining element.text with same tags name?
No, you must code it yourself. The reason is that the library deals with xml, not just xhtml. In general, <tag>a</tag><tag>b</tag>
does not have the same meaning as <tag>ab</tag>
. In fact, even in html, consolidating adjacent <p>
or <block>
tags would change the meaning of the text.