473,378 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Autogenerate classes from xml schema .xsd file (not from dos prompt)

Hi,

Does anyone know how to generate class structures from my xml schema
from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
command prompt
Is the "Custom Tool" property the way to go?
I have tried to create an external tool entry and set the Custom Tool
to the name of the entry, but nothing happens...

Anyone?
Best regards
/Magnus

Mar 16 '06 #1
4 18437
You can download and install "XSDObjectGen", an add-on which provides you
with a new project type that does this. It is also more "feature rich" than
making a call to XSD.EXE.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"SunYour" wrote:
Hi,

Does anyone know how to generate class structures from my xml schema
from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
command prompt
Is the "Custom Tool" property the way to go?
I have tried to create an external tool entry and set the Custom Tool
to the name of the entry, but nothing happens...

Anyone?
Best regards
/Magnus

Mar 16 '06 #2
Hello SunYour,

In the Property window of your XSD file put "Build Action = none" and "Custom
tool = "c:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\xsd.exe"
That's all

Class will be generated automatically

S> Does anyone know how to generate class structures from my xml schema
S> from Visual Studio, not by typing "xsd /c <xmlschema.xsd>" in the
S> command prompt
S> Is the "Custom Tool" property the way to go?
S> I have tried to create an external tool entry and set the Custom Tool
S> to the name of the entry, but nothing happens...
S> Anyone?
S>
S> Best regards
S> /Magnus
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 16 '06 #3
Hello again Michael,

I'm using Visual Studio 2005 and tried to add C:\Program
Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe to the Custom Tool
property textbox... (Build action set to none)

What about the Custom Tool Namespace property?

Nothing happens.... I've only tried to rebuild the solution... ?

/Magnus

Mar 17 '06 #4
So here's the great thing: The workflow foundation comes with a custom
tool called WorkflowXSDGenerator that does exactly the things eveyone's
talking about.

When I started working with XSDs I already had WF installed and just
took the tool for granted (wow, I love the new VS!). Well, til the day
when I uninstalled WF and my projects with XSD stopped working.

Now my choice is either write my own custom tool, install WF again or
use some a prebuild event. Of course each one of them costs me time to
do something that previously worked.

Soooo, please Microsoft, finally give us a XSD custom tool. You already
have it in WF!!! Make it available and add-on or so.

Thanks, Christoph

Mar 27 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Leona | last post by:
Hello all, does anyone know of a tool, preferably free, preferably on linux, which will take an xml file and validate it against your own custom W3C XML Schema file (.xsd) ?? All help...
1
by: Scott Brady Drummonds | last post by:
Hi, everyone, I'm designing my first XML-based application and am stuck on an issue that I presume is pretty simple. I'm trying to write a schema that can be used to validate my XML file. ...
2
by: Vagabond Software | last post by:
I have translated a DTD to an XML Schema (XSD) file by hand, and the Schema View in Visual Studio .NET 2003 seems to diplay everything properly. However, when I specify the schemalocation in my...
1
by: Szaki | last post by:
I use a BulkLoad to import file.xml to my base MS Server 2000. To import this xml file I need schema file. Mayby you know how to do this file mechanicy f.g. mayby somebody have some script in .net...
1
by: David C. Allen | last post by:
I am trying to insert an xml data island into a htm file that I am using for a help file. When I insert the lines of xml, the <xml> tag is underlined in red in VS2003 and the message says "The...
3
by: Kiran | last post by:
Hi, I want to back up my data in some table in SQL server and import it back using Bulk Load of SQL server 2K. I can use the following code to backup the data in XML ...
1
by: drb | last post by:
Hi, Newbie question #2 - hope that's OK! I'm trying to create a WSDL file using one or more XSD schema files. While WSDL.exe doesn't seem to support the XSD "import" function, if I include a...
1
by: donnie.hale | last post by:
Question: What's the "canonical" way to import an existing XSD schema file into VS2005 in such a way that I can use standard C# object / property techniques to create content of that schema type...
5
by: pronerd | last post by:
I am trying to run an XSLT on a schema (XSD) file. The schema file has a "xsd:include" tag that includes another XSD file. When I load the schema in XML editors like XML Spy the data from all of...
4
by: Kaustubh Budukh | last post by:
I am designing a VB.NET based website I have a hyperlink, upon clicking on it a "File Download" prompt opens which asks me whether I want to "Save" the file, "Open" But I want it to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.