def parse(root, response):
    """
    >>> parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo').warrantyStatus
    'Apple Limited Warranty'
    >>> parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo').estimatedPurchaseDate
    datetime.date(2010, 8, 25)
    >>> parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo').limitedWarranty
    True
    >>> parse('tests/fixtures/warranty_status.xml', 'warrantyDetailInfo').isPersonalized
    """
    parser = objectify.makeparser(remove_blank_text=True)
    lookup = objectify.ObjectifyElementClassLookup(tree_class=GsxElement)
    parser.set_element_class_lookup(lookup)

    if isinstance(root, basestring) and os.path.exists(root):
        root = objectify.parse(root, parser)
    else:
        root = objectify.fromstring(root, parser)

    return root.find('*//%s' % response)
dataset/ETHPy150Open filipp/py-gsxws/gsxws/objectify.py/parse/original