Click here to Skip to main content
11,488,877 members (76,793 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# XML
Hi

I have a xml file in which i have 5 blocks totally and i want to change the position simutaneously (i.e) The first element after a period of time should be displayed last and vice versa how to do it
Posted 30-Sep-12 23:39pm
Comments
Arun (Multithreaded) at 1-Oct-12 4:44am
   
I think your question is not clear...
Shashwath7 at 1-Oct-12 4:50am
   
consider the xml format

<img>sample1.gif</img>


<img>sample2.gif</img>


<img>sample3.gif</img>


<img>sample4.gif</img>


<img>sample5.gif</img>


these 5 tags shoul get changed in position dynamically
for example img tag in 1st position to 5th and 2nd to 4th etc and it has to be like rotating the tags
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Looks like the answer is somehow already in your question.

Create a class which holds a Timer which delegates every 5 minutes.
When the timer delegates then read your file, split the content, re-order the content and save back your file.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi Shashwath,
Very strong to me,But try like this
Based on timer control we can iterate the XML file tags that should be consist of same root tag.

http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx[^]

from above url while writing the XML Document Tags, we will keep the timer to iterate the
Nodes.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 489
1 OriginalGriff 278
2 Maciej Los 170
3 _Asif_ 145
4 Sascha Lefèvre 135
0 Sergey Alexandrovich Kryukov 9,308
1 OriginalGriff 8,375
2 Sascha Lefèvre 3,334
3 Maciej Los 2,996
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 1 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100