EDN Admin
Well-known member
<span>I am using the below XML file and trying to get all the distinct files from the XML tree. I want to store the distinct paths in a file.
<br/>
The duplicate paths are eliminated as shown in the last part of the question.
<span><br/>
Please help me get a code to do that.
<span><br/>
<RootElement> <br/>
<FirstChild><br/>
<Leaf1></Leaf1><br/>
<Leaf2></Leaf2><br/>
</FirstChild><br/>
<SecondChild><br/>
<Leaf3></Leaf3><br/>
<Leaf4></Leaf4><br/>
</SecondChild><br/>
<SecondChild> <br/>
<Leaf3></Leaf3><br/>
<Leaf5></Leaf5><br/>
</SecondChild><br/>
</RootElement> <br/>
******************************************<br/>
# of paths in the XML Tree are 10 <br/>
/RootElement<br/>
/RootElement/FirstChild<br/>
/RootElement/SecondChild<br/>
/RootElement/SecondChild<br/>
/RootElement/FirstChild/Leaf1<br/>
/RootElement/FirstChild/Leaf2<br/>
/RootElement/SecondChild/Leaf3<br/>
/RootElement/SecondChild/Leaf4<br/>
/RootElement/SecondChild/Leaf3<br/>
/RootElement/SecondChild/Leaf5 <br/>
****************************************** <hr class="sig Please mark the post answered if it serves your query.<br/>
http://subhendude.blogspot.com Subhendu De
View the full article
<br/>
The duplicate paths are eliminated as shown in the last part of the question.
<span><br/>
Please help me get a code to do that.
<span><br/>
<RootElement> <br/>
<FirstChild><br/>
<Leaf1></Leaf1><br/>
<Leaf2></Leaf2><br/>
</FirstChild><br/>
<SecondChild><br/>
<Leaf3></Leaf3><br/>
<Leaf4></Leaf4><br/>
</SecondChild><br/>
<SecondChild> <br/>
<Leaf3></Leaf3><br/>
<Leaf5></Leaf5><br/>
</SecondChild><br/>
</RootElement> <br/>
******************************************<br/>
# of paths in the XML Tree are 10 <br/>
/RootElement<br/>
/RootElement/FirstChild<br/>
/RootElement/SecondChild<br/>
/RootElement/SecondChild<br/>
/RootElement/FirstChild/Leaf1<br/>
/RootElement/FirstChild/Leaf2<br/>
/RootElement/SecondChild/Leaf3<br/>
/RootElement/SecondChild/Leaf4<br/>
/RootElement/SecondChild/Leaf3<br/>
/RootElement/SecondChild/Leaf5 <br/>
****************************************** <hr class="sig Please mark the post answered if it serves your query.<br/>
http://subhendude.blogspot.com Subhendu De
View the full article