import os
import xml.etree.ElementTree


UID = 0

for entry in os.listdir('C:\\hoffman\\articles'):
    entry = 'C:\\hoffman\\articles\\' + entry
    
    element = xml.etree.ElementTree.parse(entry).getroot()

    body = element.find('text').text
    
    if body.find('tificial intellige') != -1:
        print(entry + '\n')
        UID += 1

    if UID == 10: break
        
