TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sana fatima
NA
3
9k
Getting all the XML paths from a XML file.
Dec 14 2010 8:44 PM
Hello Friends,
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.
The duplicate paths are eliminated as shown in the last part of the question.
Please help me get a c# code to do that.
<RootElement>
<FirstChild>
<Leaf1></Leaf1>
<Leaf2></Leaf2>
</FirstChild>
<SecondChild>
<Leaf3></Leaf3>
<Leaf4></Leaf4>
</SecondChild>
<SecondChild>
<Leaf3></Leaf3>
<Leaf5></Leaf5>
</SecondChild>
</RootElement>
******************************************
# of paths in the XML Tree are 10
/RootElement
/RootElement/FirstChild
/RootElement/SecondChild
/RootElement/SecondChild
/RootElement/FirstChild/Leaf1
/RootElement/FirstChild/Leaf2
/RootElement/SecondChild/Leaf3
/RootElement/SecondChild/Leaf4
/RootElement/SecondChild/Leaf3
/RootElement/SecondChild/Leaf5
******************************************
# of distinct paths in the XML Tree are 9
/RootElement
/RootElement/FirstChild
/RootElement/SecondChild
/RootElement/SecondChild
/RootElement/FirstChild/Leaf1
/RootElement/FirstChild/Leaf2
/RootElement/SecondChild/Leaf3
/RootElement/SecondChild/Leaf4
/RootElement/SecondChild/Leaf5
Thanks,
sana.
Reply
Answers (
2
)
Luhn’s algorithm
same function in c as matlab