473,513 Members | 2,492 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Generate xmldoc comments for generated c# class using xsd.exe

Hi,

I have a schema file defining objects. I then use xsd to convert that schema into a C# class file. Is it possible to have xmldoc comments added to the generated c# file? I have attempted to add <xsd:annotation><xsd:documentation /> tags to various parts of the schema, but that does not appear to do anything.

Thanks

Jim
Nov 15 '05 #1
4 5151
James,

I don't believe that this is possible. You will have to add the
comments yourself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James Geurts" <ji********@biacreations.com> wrote in message
news:14**********************************@microsof t.com...
Hi,

I have a schema file defining objects. I then use xsd to convert that schema into a C# class file. Is it possible to have xmldoc comments added
to the generated c# file? I have attempted to add
<xsd:annotation><xsd:documentation /> tags to various parts of the schema,
but that does not appear to do anything.
Thanks

Jim

Nov 15 '05 #2
Hi Jim,

Thank you for posting in the community! My name is Kevin, and I will be
assisting you on this issue.

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to make xsd.exe add comments
to the generated .cs file automatically. If there's any misunderstanding,
please feel free to point me out.

As far as I know, this cannot be achieved by xsd.exe automatically. I think
you have to do it manually. Each time the schema is modified, you have to
regenerate the .cs file. The comments will be lost. If you need to know
more about xsd.exe please refer to the following link:

http://msdn.microsoft.com/library/de...us/cptools/htm
l/cpconxmlschemadefinitiontoolxsdexe.asp

Does this answer your question? If anything is unclear, please feel free to
reply to the post.

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

Nov 15 '05 #3
Note that if you add them yourself, they will vanish every time the class is
regenerated (every time you change your xsd).

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
James,

I don't believe that this is possible. You will have to add the
comments yourself.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"James Geurts" <ji********@biacreations.com> wrote in message
news:14**********************************@microsof t.com...
Hi,

I have a schema file defining objects. I then use xsd to convert that

schema into a C# class file. Is it possible to have xmldoc comments added
to the generated c# file? I have attempted to add
<xsd:annotation><xsd:documentation /> tags to various parts of the schema,
but that does not appear to do anything.

Thanks

Jim


Nov 15 '05 #4
XSD.exe is just a CodeGen tool provided by microsoft with visual studio (and
a nice one at that).

Code Generation is available in the System.CodeDom and
System.CodeDom.Compiler namespaces, and as long as you feel like some real
lateral thinking its not _THAT_ hard to produce an xsd.exe -type tool that
turns an Xml document into a typed dataset. If that happens to be the same
Xml document you have, but you also parse the xsd:annotation elements to
produce code documentation then so be it.

If you look at the output of XSD.exe, and then look at the Xml that you use
to produce it you will see that its just a case of writing that recursive
function that looks through the Xml and produces the right code.


"James Geurts" <ji********@biacreations.com> wrote in message
news:14**********************************@microsof t.com...
Hi,

I have a schema file defining objects. I then use xsd to convert that schema into a C# class file. Is it possible to have xmldoc comments added
to the generated c# file? I have attempted to add
<xsd:annotation><xsd:documentation /> tags to various parts of the schema,
but that does not appear to do anything.
Thanks

Jim

Nov 15 '05 #5

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

Similar topics

1
2031
by: alex bazan | last post by:
I used the xslt functions with php4... now i've moved to php5, and, as the xslt functions are no longer bundled, i'm moving the code to the XSLTProcessor class. I've found a problem with the...
2
4711
by: Matt | last post by:
Hello, I would like to generate what I call an "overall class hierarchy" in UML automatically derived from my C++ code source. An example of what I seek: ...
1
9884
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or...
2
1299
by: Blair Chen | last post by:
Pls help me out I am trying to generate xml file via XmlDocument class. I ceated a XmlDocument instance, how can I convert it to a physical xml file(e.g. test.xml)? following is the code: //add...
2
6898
by: PeterW | last post by:
I have an xml file from which I want to generate an xsd schema and at a later stage a cs class. The xml file has a mix of defined namespaces and also an empty namespace. These are defined as...
29
3709
by: Lauren Wilson | last post by:
Does anyone know how the following info is extracted from the user's computer by a Front Page form? HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107...
4
2181
by: Zoltan Hernyak | last post by:
Hi, How can I generate a Windows help file (CHM or HLP) from my C# source code? I commented every class and methods and fields, and generated a DLL, but how can I generate a class...
8
5795
by: Bill Rust | last post by:
I've created an "Add Item" wizard for VB.NET 2003 that allows a user to add a specialized class that works with my application framework. In the wizard, the user can select the interfaces they...
8
7025
by: Les Caudle | last post by:
Using this command line to run XSD.exe xsd /c /o:outputDir input.xsd /f on the following XSD <?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema"...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.