By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

Best wa to Read, Write/Create XML-Files

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.