def parse(text, loader=None, begin_position=0, end_position=None, log=None):
    if not loader or not loader.available():
        return text
    start = begin_position
    if not end_position:
        end_position = len(text)
    result = []
    for b in r_tag.finditer(text, start, end_position):
        span = b.span()
        result.append(text[start:span[0]])
        p = ParseXML(text, b.span()[0], log)
        p.parse()
        # print_dict(p.attrs)
        result.append(process_tag(p.attrs[p.tag], p.tag, loader, log=log))
        start = p.pos

    result.append(text[start:end_position])
    return ''.join(result)
dataset/ETHPy150Open limodou/uliweb/uliweb/core/taglibs.py/parse/original