You are viewing a single comment's thread. Return to all comments →
maxdepth = 0 def depth(elem, level): global maxdepth l = level if elem: l += 1 for n in elem: depth(n,l) maxdepth = maxdepth if maxdepth >= l+1 else l+1
Seems like cookies are disabled on this browser, please enable them to open this website
XML2 - Find the Maximum Depth
You are viewing a single comment's thread. Return to all comments →