473,395 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

xml records c# newbee

I need to store records in xml files, i need to load the
record, add new nodes, delete nodes and modify existing ones then
save the file again.

Looks to me like there are different ways of working with xml,
xml file writer and xml documents. Which method is most suitable
to what i want to do? any links to tutorials would be most appreciated,

I have googled around and not really found any examples of what i want to
do.

Thanks in advance

Jun 3 '07 #1
2 2640
tony leake wrote:
I need to store records in xml files, i need to load the
record, add new nodes, delete nodes and modify existing ones then
save the file again.

Looks to me like there are different ways of working with xml,
xml file writer and xml documents. Which method is most suitable
to what i want to do?
Use System.Xml.XmlDocument to load the XML into a DOM tree structure,
then you can manipulate the tree structure (CreateElement,
AppendChild/InsertBefore/InsertAfter to insert elements, RemoveChild to
delete, InnerText to modify) and save the changes back using the Save
method.

Another way the .NET framework offers is XML deserialization and
serialization, that way you define .NET classes with public properties
that map to XML elements or attributes and you do not work with an XML
tree structure but rather with .NET objects and .NET types.

See <http://msdn2.microsoft.com/en-us/library/2bcctyt8(VS.80).aspxfor
an overview and introduction, if you need concrete help after reading
that then post examples of the XML you want to manipulate and we can
show you some code snippet.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jun 4 '07 #2
Martin Honnen wrote:

Another way the .NET framework offers is XML deserialization and
serialization, that way you define .NET classes with public properties
that map to XML elements or attributes and you do not work with an XML
tree structure but rather with .NET objects and .NET types.
Perfect for what i need, and i found some articles to get me started,
now i know what i'm looking for.

Thanks.
Jun 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Newbee | last post by:
Hi ! Let's say that this is the folder on the server: /web/firstDir/secondDir/images/image.gif where i have stored my pictures. I have tryed with apsolute and relative paths but i can't display...
2
by: Newbee Adam | last post by:
some said that .NET app can run on any program where rutime exists. What is "runtime" in this sense? will I have to install runtime or .net framework or .NET support on an xp machine for a...
4
by: PerryC | last post by:
All, 1. Do the following codes seem ok? 2. If so, then how do I pull the value of YOE1 and YOE2 into my report? (to do some further calculations) ...
2
by: Martin Hvidberg | last post by:
Dear list I have found a declaration like this: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> #include "ectemp.h"
9
by: EMW | last post by:
I have created a page in aspx and after a click on a button, a new page should open. How is this possible? I tried it doing it like in vb.NET with opening a new form, but it doesn't work. rg,...
8
by: ikarias | last post by:
Maybe not the right place to aske this, but a newbee (me) needs help. i trying to input a number into a textbox, so i can make a series of calculations. in the old days of basic i just jused...
2
by: NewBee | last post by:
Hi, I am new in the field and might be asking a dumb question, but please I still need help. I am running the Business Object 5.1.8, and using Freehand SQL with Oracle 8.1 connecting. I have...
2
by: Mel | last post by:
I have a selection box with 3 values. what i need is to pass 3 urls to a function that has a switch statement and based on the selection index goes on one of the tree urls. Question is how do i...
6
by: siofok | last post by:
Hi, I have a table with color values. All these values differ from 1 color to 5 colors. I.e. brown - white - yellow -purple - blue white - yellow green etc.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.