Currently we have a xml file such as :
<file>
<dircetory name="test">
<directory name="test1">
<directory name="test2"></directory>
</directory>
</directory>
<directory name="test2">
</directory>
</file>
The xml structure is not stable, but I need to get the xml node by name attribute
Now I get the "test2" string, and try to get the <directory name="test2"></directory> element, I could use foreach to iterator one by one, but is there any elegent way to do that ?
Thanks