Re: Generete an XML instance from its XSD
Shahar Ron wrote:
> Is there a way to generate in code an empty instance of an XML from it's XSD?
> I have a lot of schemas and I want at run time to create an empty instance
> for them (I then have to fill one or two fields).
Check out this article
<URL:http://msdn2.microsoft.com/en-us/library/aa302296.aspx> which has
code to create a sample document from a schema. I think it even creates
default contents for elements, if that is not what you want then you
need to adapt the code to only create the elements but no contents.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Date:Wed, 22 Aug 2007 16:25:43 +0200
Author:
|