<sec id="00005"><no>1.1</no>
sfasfasdfadsfsdaf
<sec id="00010"><no>1.1.1</no>
sahfjsahdfasddfj
</sec
<sec id="00015"><no>1.1.2</no>
sahfjsahdfasddfj
<sec id="00020"><no>1.1.2.1</no>
sahfjsahdfasddfj
</sec>
<sec id="00025"><no>1.1.2.2</no>
safksajdklfasd
</sec>
</sec>
<sec id="00015"><no>1.1.3</no>
sahfjsahdfasddfj
</sec>
</sec>
<sec id="00005"><no>1.2</no>....
This is bad example
<sec id="00005"><no>1.1</no>
sfasfasdfadsfsdaf
<sec id="00010"><no>1.1.1</no>
sahfjsahdfasddfj
</sec
<sec id="00015"><no>1.1.2</no>
sahfjsahdfasddfj
</sec> #it should not be closed here (beca
+use next sublevel is opening here)
<sec id="00020"><no>1.1.2.1</no>
sahfjsahdfasddfj
</sec>
<sec id="00025"><no>1.1.2.2</no>
safksajdklfasd
</sec> #that should be closed here
<sec id="00015"><no>1.1.3</no>
sahfjsahdfasddfj
</sec>
</sec>
<sec id="00005"><no>1.2</no>....
Whereas here the second level section should close after third level is closed. This is wrong nesting. Actually the levels are identified by number with dots.
1.1 - first level
1.1.1 - second level (first section's sub level)
1.1.1.1 - third level (second section's sub level)
1.1.1.1.(i) - fourth level (third section's sub level)
1.1.1.1.(i).(a) - fifth level (fourth section's sub level)
Here the elements are same for all levels <sec, so parser not showing errors. If the elements are different for subsections like <sec, <sec1 , <sec2, the parser would have showed error. so here the nesting we are finding with the help of numbers 1.1, 1.1.1,...
updated
Regards,
Anniyan
(CREATED in HELL by DEVIL to s|EVILS|GOODS|g in WORLD)
|