How to generate .xsd from a .cs using xsd.exe tool? - xsd

I have a .cs file that contains a subclass of XTypedElement and IXMetaData. Microsoft has a tool that generates XSD files automatically from managed code, but it doesn't accept .cs files. It only accepts .exe, .dll, .xdr, .xml, and .xsd.
How do I convert my .cs file into a .xsd file with this tool?

You first need to compile it into dll or exe file, i.e. .NET assembly, and then use this as an input for xsd.exe
If you want to convert only a specific class, use the following command:
xsd bin\Release\MyAssembly.exe /type:The.FullName.Of.YourType

Related

How to Generate an XML out of XSD in Groovy

I tried lot of online tools to generate xml out of complex xsd file but things are not working. Is there any possibility to generate an xml out of complex xsd file in Groovy or any other third party applications to covert xsd into xml

How to convert xsd's library (more than one xsd) to ecore (EMF)

How to convert xsd's library (more than one xsd) to ecore (EMF)
During the XML Schema import, when i browse the file system for Model URI,
Eclipse gives me option to select one xsd at a time,
What if i have multiple XSD's
In Juno you are able to select more than one xsd in the EMF Project Wizard, when browsing the workspace. So if the behavior is different in File system browser, than you should create a project containing the xsds in your workspace first.

Consuming .ashx files in C#

I need to consume / parse .ashx files in C#. I could create strongly typed C# class by using xsd.exe and add this to my project. But the schema of the .ashx could change at anytime.
So, I don't want to create C# classes using command line utility like xsd.
Is there any way i can create C# class on the fly from a .ashx and use the class to parse the .ashx content?.
I assume that what you need to parse/consume is the XML produced by the .ashx handler.
There is no way I know of to generate a class directly using .NET functions - you could call xsd.exe and then load and compile the generated code - quite a hack.

How to decompile, edit and recompile a single class file from a j2me .jar application

The .jar(mobile) application contains many class files I want to decompile a single class fiele from it, edit it and Recompile it. Which software will help in recompiling a single class file independently?
First you have to extract the files from the jar with a zip tool.
Then, as pointed by gnat, you can use a Java Decompiler as:
Java Decompiler
JAD
Then, you modify the .java and recompile it.
Finally you can use JAR tool to create a new jar, or even use a zip tool to replace the .class file in the original jar. Note that if the jar was signed in the first place, you have to make it from scratch and sign it.
Most decompilers make a complete mess out of ME applications. One that gives me good results is Jadx. It's easy to use from here: http://www.javadecompilers.com/

XSD for the XML file that Nunit uses

Where can I find the XSD for the XML file that Nunit uses ?
For the results file? See Results.xsd (note that it didn't display properly for me, in Chrome; you may have to view source, or download, to see it properly).
A transform file, and a sample results file, are in the parent directory. The files are also in the documentation package on the NUnit download page.

Resources