Advertisement

04.20.2008 at 01:50AM PDT, ID: 23337486
[x]
Attachment Details

Appending to an XML file without reloading it

Asked by pixarksa in Microsoft Visual C#.Net, Visual Studio 2008

Hi,

I need to write some data into an XML file. I am using C# and that should work with (.Net Compact Frame Work).

My XML file almost looks like:
<student>
      <id>1001</id>
      <name>Justin Smith</name>
      <date>2008-01-01</date>
     <time>09:35:21</time>
</student>

The problem is that i don't want to reload the entire XML file every time i want to write in it. The code should be able to append to the XML file with new student record at the bottom of the XML file. That means it wont be slow if the file grows up.

All data will be prepared by me in string variables and what i need is how to append them into a new record in the XML. Currently, i don't need to read the XML file and i don't care how big this XML file is. I just needs to keep logging into it.

By the way, I am using Framework 2.0 not 3.0

The point of asking this is that i am not a C# pro. Just doing some small project and needs help.

Regards
Start Free Trial
 
Loading Advertisement...
 
[+][-]04.20.2008 at 10:10AM PDT, ID: 21396770

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, Visual Studio 2008
Sign Up Now!
Solution Provided By: FernandoSoto
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.20.2008 at 10:20AM PDT, ID: 21396816

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.21.2008 at 09:02AM PDT, ID: 21403268

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.23.2008 at 05:58PM PDT, ID: 21851736

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 07:25PM PDT, ID: 21888986

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628