XML2 - Find the Maximum Depth

  • + 1 comment
    if (level + 1) > maxdepth:
            maxdepth = level + 1
    for child in elem:
            depth(child, level + 1)