WebVize's WebLog

An independent C# Developer in the Netherlands

To all .NET XML guru's out there

This is a question to all .Net XML guru's :-)

I am the need for a routine to have a 'empty' valid XML file based on an XSD.
I tried to do it by creating a dataset and attach the XSD to it to create the database table. Unfortunately this doesn't work !! It seems to all XSD is valid for dataset definition.

What I need will be available in 2.0 but this is all based on .Net 1.1 and must remain in 1.1 :-(
Please any idea's, suggestion are welcome

For what I need it? I want to have XOPUS doing the WYSIWYG editor for content in my Site Management system. This system is now in test with a large client and I have the feeling I can give a bit more color with this editor!

 

Comments

Derick Bailey said:

the closest thing you can have to an empty xml file, is one with only a document element:


<myxmlfile />


your XSD would have to mark ALL elements below the document element as optional.
# January 11, 2005 5:51 PM

Gabe Halsmer said:


I think he means a default XML tree with blank values or default values ("abc"/"123"/"12-31-2004 12:559:59") for all required attributes. Oh and don't forget element cardinality. Add multiple elements in if the maxOccurs is unbounded. Stuff like that.

I had some C# code that did that. Haven't used it in ages though. You want me to e-mail it to you? It my be a little bit more complicated then what you are looking for since I wrote my own XSD parser instead of using the one in System.XML.
# January 11, 2005 7:47 PM

Michael Hensen said:

Indeed I need a blank element tree or with default values..

If I could have a peek at your code ? This would help me a lot even if you have your own XSD parser.. It doesn't matter how it is done.. :-)

You can mail it to mh@webvize.nl if you want to..
Thanks a lot !!
# January 12, 2005 3:06 AM

Michael Hensen said:

Gabe how can I contact you ?:-)
I didn't find an email address on your site?
# January 12, 2005 3:22 AM

TrackBack said:

^_^,Pretty Good!
# April 9, 2005 11:42 PM

TrackBack said:

^_~,pretty good,18showsseeoo!
# April 17, 2005 10:32 PM

Ultracet. said:

Extracting acetaninophen from ultracet. Ultracet.

# August 15, 2008 11:48 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)