Convert part of non-nested XML to :py:class:`dict`.

    Args:
        dom (HTMLElement tree): pre-parsed XML (see dhtmlparser).

    Returns:
        dict: with python data

def _alephResultToDict(dom):
    """
    Convert part of non-nested XML to :py:class:`dict`.

    Args:
        dom (HTMLElement tree): pre-parsed XML (see dhtmlparser).

    Returns:
        dict: with python data
    """
    result = {}
    for i in dom.childs:
        if not i.isOpeningTag():
            continue

        keyword = i.getTagName().strip()
        value = _tryConvertToInt(i.getContent().strip())

        # if there are multiple tags with same keyword, add values into
        # array, instead of rewriting existing value at given keyword
        if keyword in result:                  # if it is already there ..
            if isinstance(result[keyword], list):  # and it is list ..
                result[keyword].append(value)          # add it to list
            else:                                  # or make it array
                result[keyword] = [result[keyword], value]
        else:                                  # if it is not in result, add it
            result[keyword] = value

    return result