while True:
    match = re.match(
        """
        \\s*                 
        (                   
          <(?P<TAG>\\S+).*?> 
            .*?             
          </(?P=TAG)>       
        )                   
        (?P<REM>.*)         
      """
        , data, re.DOTALL | re.VERBOSE)
if not match:
    break
document = match.group(1)
Parse several XML declarations in a single file by means of lxml.etree.iterparse