我想像这样计算 XML 文件的深度:
<?xml version="1.0" encoding="iso-8859-1"?>
<country> -----> Level 1
<name> France </name> ----> Level 2
<city> Paris </city>
<region>
<name> Nord-Pas De Calais </name> ---> Level 3
<population> 3996 </population>
<city> Lille </city>
</region>
<region>
</region>
</country>