Groups | Blog | Home
all groups > dotnet xml > april 2005 >

dotnet xml : CSV to XML, now to validate


chris yoker via DotNetMonster.com
4/4/2005 2:14:06 PM
hiya,
I have a 3rd party function that converts a CSV to an XML doc.
I now need to validate the xmlDoc.I understand that I need a valid XSD for
the newly created xmlDoc, but the xmlDoc contains no schema definitions
etc.I'm not sure how to create an XSD, so that the fields are restricted to
"integer" datatypes etc.

Been looking for a while.I assume that I don't have to manually write an
XSD?maybe I should create a "dummy" table in sqlServer, then generate a
dataset to get the XSD?Or, maybe vis studio 2003 has tools to make this
easier?

Any suggestions appreciated.

cheers,
yogi

--
chris yoker via DotNetMonster.com
4/4/2005 2:50:01 PM
cheers Lorenzo,
I have successfully located the xsd.exe
When I click on it, a DOS window opens up for a few seconds then closes.Is
this normal behaviour?I understand that I should probably supply args, but
I thought that it would open in DOS mode and stay open, waiting for input?

Is thare any way that I can:
1) assign this xsd.exe to my run directory, so that I can simply type in
Run --> Xsd.exe?
2) keep the xsd.exe open?

Sorry for the questions, command line stuff isn't my strongpoint ;-)

many thanks,
yogi

--
chris yoker via DotNetMonster.com
4/4/2005 3:28:47 PM
thanks Gabriel.
this now creates them all with a default dataType of "string".I assume that
I now go in and manually change the datatypes (if required) to integer etc?
you've been a great help.

BTW, here's a wee article that I've just found, explaining the motivation +
approaches for xml schemas:
http://www.developerfusion.com/show/2386/1/

cheers,
yogi

--
Gabriel Lozano-Morán
4/4/2005 4:18:41 PM
use the tool XSD.exe that comes with Visual Studio to generate an XML Schema
from a XML doc

Gabriel Lozano-Morán

"chris yoker via DotNetMonster.com" <forum@DotNetMonster.com> wrote in
message news:0a53faf053d645f8bfcf05f30cd72b7e@DotNetMonster.com...
[quoted text, click to view]

Gabriel Lozano-Morán
4/4/2005 4:58:40 PM
You should open a Visual Studio .NET 2003 command prompt and type the
following:

XSD.EXE yourxml.xml /o:c:\outputdir

Gabriel Lozano-Morán

"chris yoker via DotNetMonster.com" <forum@DotNetMonster.com> wrote in
message news:6a309637c8234c518ef795643a5fbef2@DotNetMonster.com...
[quoted text, click to view]

AddThis Social Bookmark Button