473,385 Members | 1,372 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,385 software developers and data experts.

Best wa to Read, Write/Create XML-Files

Hello,

I have to solve the following task:
- create an editor-application in c# to read, modify and create
xml-files
- .xsd-schema-file is available and can be used

Currently, I am thinking of the following way to do the job:
- use xsd.exe to create basic c#-classes from xsd.file (modify these
classes according to my particular needs)
- read xml-file and create according object-hyrarchie with the classes
(READ)
- serialize the classes to create xml-file (WRITE)

Is this a good way to do the job?
Do you have better suggestions?

Is it necessary to create static classes from the xsd-file (using
xsd.exe)
or is there a way to do that dynamically during runtime?

I appreciate your help on this!
Thanks!

Nov 13 '05 #1
1 1584
On 13 Nov 2005 13:21:15 -0800, ez*******@gmx.de wrote:
Hello,

I have to solve the following task:
- create an editor-application in c# to read, modify and create
xml-files
- .xsd-schema-file is available and can be used

Currently, I am thinking of the following way to do the job:
- use xsd.exe to create basic c#-classes from xsd.file (modify these
classes according to my particular needs)
- read xml-file and create according object-hyrarchie with the classes
(READ)
- serialize the classes to create xml-file (WRITE)

Is this a good way to do the job?
Do you have better suggestions?

Is it necessary to create static classes from the xsd-file (using
xsd.exe)
or is there a way to do that dynamically during runtime?

I appreciate your help on this!
Thanks!


Don't bother with XSD.EXE unless you have fixed schemas and want to create
objects that conform to it.
If you are creating a generic editor then this is pointless. If you want
something to allow freeform editing then write it as a text editor, then
validate it using the built-in validation methods.

Cheers,
Jason
Nov 14 '05 #2

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

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
4
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
10
by: Neil | last post by:
I need to get two values from a complex SQL statement which returns a single record and use those two values to update a single record in a table. In order to assign those two values to variables...
7
by: Jimbo | last post by:
What's the best format to save a configuration file? I'm currently using an INI extension and I write it like a normal ascii file. Is this the best way? I've heard of using XML to create a config...
3
by: WebMatrix | last post by:
I am struggling with implementing somewhat complicated UI web-control. I explored Repeater, but I am not sure if it's the best way to go. I am leaning towards writing my own custom control and...
11
by: Tom | last post by:
I am planning on adding a Preferences form to my application and using the Property Grid to display the preferences to the user. What do you think would be the best way to save these preferences...
5
by: Trapulo | last post by:
Hello, I need to send to a webservice a parameter that is a string containing an XML doc. In this xml, a node value came from a byte array (it's an RSA signature). What is the best way to convert...
9
by: Yehia A.Salam | last post by:
Hello, I am building an ASP.net website that connects to an XML database, and was wondering which is the best way to create the connection if I need frequent access to the database, I have one...
4
by: Brian | last post by:
HI, I have two sets of data, the largest set of data contains 370 rows... both sets only have two columns. I want to be able to distribute the data with my applaction. The other option, would be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.