DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Wed, 22 Aug 2007 07:06:03 -0700,    posted on: microsoft.public.dotnet.xml        back       

Thread Index
  1    Shahar Ron Shahar
          2    Martin Honnen


Generete an XML instance from its XSD   
Hi

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). 

Shahar
Date:Wed, 22 Aug 2007 07:06:03 -0700   Author:  

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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us