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
Adam Turner
NA
60
0
Sorting XML
Jun 8 2011 3:07 PM
I'm trying to sort some XML in C# that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<websites>
<site language="Spanish" name="Excélsior" order="2">http://www.excelsior.com.mx/</site>
<site language="Japanese" name="TOKYO Web" order="3">http://www.tokyo-np.co.jp/</site>
<site language="Italian" name="Corriere della Sera" order="1">http://www.corriere.it/</site>
<site language="Spanish" name="SpanishTest1" order="4">www.spanishtest1.com</site>
</websites>
I'm trying to implement a feature that will allow a user to sort the websites by their language. The order of the websites should reflect the language, and the language should be sorted alphabetically. I'm completely stuck on how to do this.
So in theory it should probably look like this after a sort:
<?xml version="1.0" encoding="UTF-8"?>
<websites>
<site language="Italian" name="Corriere della Sera" order="1">http://www.corriere.it/</site>
<site language="Japanese" name="TOKYO Web" order="2">http://www.tokyo-np.co.jp/</site>
<site language="Spanish" name="Excélsior" order="3">http://www.excelsior.com.mx/</site>
<site language="Spanish" name="SpanishTest1" order="4">www.spanishtest1.com</site>
</websites>
Reply
Answers (
8
)
Two Click events for one button
Set font color of inactive textbox