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
Francis
NA
5
0
XML Parsing (Avoiding Duplicate Tags)
Apr 29 2010 10:04 AM
Hello,
I am attempting to write some C# code that will parse an XML based on my conditions and certain tags. I have utilized XPATH to find the specific nodes and put them in a NodeList, however I will also have to create some code that will avoid copying down more than one element/tag for each entity. I will then takes this new Lists and create a new nodes/XML doc based on the values I've got.
Although the XML I am parsing is much more messy and larger than this, for Example, I would only want to find the 1st Year and 1st Brand of each cleat, thus making years captured: 2004 & 2010 and Brands: Adidas & Nike.
<Closet>
<Cleat>
<Year>2004</Year>
<Brand>Adidas</Brand>
</Cleat>
<Cleat>
<Year>2010</Year>
<Brand>Nike</Brand>
<Brand>NIGH-KEE</Brand>
</Cleat>
</Closet>
It is possible to achieve this? I've read some references towards XSLT, but doesn't that only do html/website displays?
Thank You in advance
Reply
Answers (
2
)
Base class library
ASP.NET Developing Own Time Extender