I’m planning to create a news item which uses xml as it’s backend and the Display should be like:
Date: 08/Mar/2010
——————————
Title | News
——————————
News 4 | Some news
News 3 | Some news
News 2 | Some news
News 1 | Some news
——————————
Date: 07/Mar/2010
——————————
Title | News
——————————
News 5 | Some news
News 4 | Some news
News 3 | Some news
News 2 | Some news
News 1 | Some news
- Display should be sorted on Date (descending)
- Then news items should be sorted on time (descending)
Today’s news item should be on top, then titles should be sorted-decending (timewise), later will come previous day’s news items.
I’m not able to come up with the logic of xml which should be used in this case. moreover I’m not able to figure out how should I check “Today’s date” in xml’s “if” statement. Can I please get some code sample to understand this kinda logic???
—- Previous Question ——————————————————————
How can I export a data from textBox1, textBox2 & textBox3 on my winform (visual studio C#) so that it can automatically create an xml file with proper placing of these data????
Let’s say:
textBox1 = Name:
textBox2 = Age:
textBox3 = Roll No
It would be great if the exported xml can be appended (add the new data in the EOF) if we export the data again.
Any idea plz…..
I was able to figure out the answer and was able to make my 1st trial with xml a success. I was trying to work with xml and C#. So I started on with a small thing:
Here’s the working code of button click.
Sadly I was not able to get any help from here(Stackoverflow) for editing the xml… so I decided to share the code with everybody here. Maybe this answer will help someone new like me.
This code could be modified with better skills and utilities, and if somebody has time & interest in helping a newbie then please do come forward.
Gud luck to all newbies here 🙂