def add_articles_from_xml(thread, xml_root):
    """Helper function to create Article objects from XML input and add them to a Thread object."""
    added_items = False

    for item in xml_root.find('articles').findall('article'):
        data = {
            'id': int(item.attrib['id']),
            'username': item.attrib['username'],
            'link': item.attrib['link'],
            'postdate': item.attrib['postdate'],
            'editdate': item.attrib['editdate'],
            'numedits': int(item.attrib['numedits']),
        }
        thread.add_article(data)
        added_items = True

    return added_items