Connecting Tech Pros Worldwide Forums | Help | Site Map

How to Write XML document by reading .XSD File

mitesh.n.gandhi@gmail.com
Guest
 
Posts: n/a
#1: Nov 12 '05
Hi,

I would like to Write XML document by reading .xsd file using
vb.net/c#.net.

May be this Question has been answered earlier.
Please if anyone knows the link or example let me know.

Thanks,
Mitesh


Pascal Schmitt
Guest
 
Posts: n/a
#2: Nov 12 '05

re: How to Write XML document by reading .XSD File


Hello!
[color=blue]
> I would like to Write XML document by reading .xsd file using
> vb.net/c#.net.[/color]

You could use the Schema-Object-Model (SOM) but consider this:

<element name="root">
<complexType>
<choice>
<element name="a" />
<element name="b" />
</choice>
</complexType>
</element>

How should your output document look like?

<root><a /></root> or <root><b /></root>?


Consider the XHTML-Schema! There are infinite choices:

<group name="block">
<element name="div">
<complexType>
<choice>
<group ref="block" />
</choice>
</complexType>
</element>
</group>

What will you do?

<div />, <div><div /></div>, <div><div><div /></div></div>?

It is impossible to cover it all...

--
Pascal Schmitt
Stan Kitsis [MSFT]
Guest
 
Posts: n/a
#3: Nov 12 '05

re: How to Write XML document by reading .XSD File


The following article describes how you can use classes in the
System.XML.Schema namespace of the Microsoft .NET Framework to build a tool
that generates sample XML documents that conform to a given schema:
http://msdn.microsoft.com/library/en...tml/xmlgen.asp


--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


<mitesh.n.gandhi@gmail.com> wrote in message
news:1123827838.396355.97780@g44g2000cwa.googlegro ups.com...[color=blue]
> Hi,
>
> I would like to Write XML document by reading .xsd file using
> vb.net/c#.net.
>
> May be this Question has been answered earlier.
> Please if anyone knows the link or example let me know.
>
> Thanks,
> Mitesh
>[/color]


Closed Thread