473,545 Members | 2,041 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# and .NET (XML and serialization)

1 New Member
Hi,

I want to do following two steps. I am already done with first step. But I can't do the second step. Could anyone give me any idea how to do it?

Step 1: After serialization, I load XML file's data in a datagrid in tabular format.

Step2 : Now I want to add row in datagrid. And I want to save newly added data to same XML file.

Thanks

Neel
Feb 22 '10 #1
1 1187
Bassem
344 Contributor
Hi,

I think of that:
Expand|Select|Wrap|Line Numbers
  1. DataSet ds = new DataSet();
  2. dataGrid.DataSource = ds;
Now try to think of that:
Expand|Select|Wrap|Line Numbers
  1. ds.WriteXml("myFile.xml")
Thanks,
Bassem
Feb 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2824
by: Leszek | last post by:
Hello, I have the following XML file: <events> <event name="event1"> <sessions> <session date="23 Feb 2004" time="10:00 - 15:00" location="Toronto" /> </sessions> </event>
0
2135
by: Mike | last post by:
Hi, I am consuming a web service in my asp.net application. I added the web references in Visual Studio by pointing to a wsdl file. Visual Studio automatically creates the Reference.cs file and the code that is used to serialize the classes used in the server's service. I create an instance of the input variable, set my values, and pass it...
4
3124
by: Jeff T. | last post by:
Hello, I have an existing set of C# classes that encapsulate our application data. They are in a heirachy with each subclass defining more specific types of data. I would like to serialize these data objects as XML but perserve the relationships in the XML document. For example, if my classes were: public class GenericItem { }
1
4353
by: andrewcw | last post by:
There is an error in XML document (1, 2). I used XML spy to create the XML and XSD. When I asked to have the XML validated it said it was OK. I used the .net SDK to generate the class. I have done this before but this time I have no idea why I am getting the error. Any ideas ?? THANKS ! <qcsttatus> <manual sourcerootfolder=""...
0
1705
by: eSapient | last post by:
I generated serialization/deserialization code for this schema using the xsd tool: <?xml version="1.0" encoding="UTF-8"?> <xs:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="FAAAvxType"> <xs:sequence> <xs:choice>
3
15011
by: Paulo Morgado [MVP] | last post by:
Hi all ..NET Framework 1.1 I have created several types that are serailized to XML as strings. Someting like this: public struct MyInt32 : IXmlSerializable { int value;
3
10800
by: namewitheldbyrequest | last post by:
"The XML element 'EnableTheming' from namespace 'http://tempuri.org/' is already present in the current scope" I created a Web Service: I imported System.Data.SqlClient so I could access SQL server tables programmatically. The web service builds and deploys with no problems. When I try to add the corresponding Web Reference to the Web Site...
0
2770
by: =?Utf-8?B?Y2luZHk=?= | last post by:
I know I wrote before a week ago when I knew even less than now but I am getting better please anyone give me a clue or an example. Am I completely off track? I have a datarow in a table with the fields to map to an xsd. Then i call a web service upload method that wants the xml strongly typed to the xsd in a string. so I have generated...
0
6593
by: bharathreddy | last post by:
Before going to that i want to say few thing on serialization : Serialization is the process of converting an object into a form that can be readily transported. For example, you can serialize an object and transport it over the Internet using HTTP between a client and a server. On the other end, deserialization reconstructs the object from the...
1
11057
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
0
7661
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7433
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7763
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5976
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5340
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4949
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3458
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.