def getXmlBooks(xml):
    """
    Returns a list of book xml trees found within the xml.
    Books without any children will be ignored
    :param xml: osis xml
    :type xml: xml.etree.ElementTree
    :return:
    """
    if not len(xml):
        return []
    if 'type' in xml.attrib and xml.attrib['type'] == 'book':
        return [xml]
    books = []
    for child in xml:
        books += getXmlBooks(child)
    return books