A: 

You could just create a Typed DataSet from the XSD and then fill one of those objects with the XML. That's the pretty common method.

BobbyShaftoe
Interesting! How would you fill it?
Kjensen
I am guessing myDataSet.ReadXml(stream/reader/file)
Preets
A: 

Kjensen, can you elaborate on your problem a little ? What do you mean by

Generated classes (two actually), using xsd.exe ?

Preets
I am just showing the two classes that xsd generated for me. That is just supplemental information, not a problem.
Kjensen
I edited the question to make it more clear, what that is. :)
Kjensen
Do the standard .NET Serializer / Deserializers not work for you ? Why do I feel I am missing something !
Preets
It works perfectly for me - I just did not know it existed (serializer/deserializer).
Kjensen
Ahh... Super ! :)
Preets
A: 

I guess that you want to create classes for parsing an xml file which should fullfill a given xsd. If so you can generate a .jar using apache xmlbeans

Read this:

http://xmlbeans.apache.org/documentation/tutorial_getstarted.html ..

Down load it from: http://www.apache.org/dist/xmlbeans/binaries/

Actually the simple command is goto the "bin" directory of "xml beans" (you've installed that)

then type

scomp -out <out.jar> <in.xsd>

that's it ..

Luis

PS: As far as I remember XMLspy brings also the possibility for automatically creating java classes for the same pourpose.

Luixv
The question is specific to .NET (see tags)
Enrico Campidoglio
+8  A: 

You could use the XmlSerializer to deserialize the XML text into instances of the classes generated by xsd.exe.
The XmlSerializer will use the metadata attributes placed on the generated classes to map back and forth between XML elements and objects.

string xmlSource = "<ResultSet><Result precision=\"address\"><Latitude>47.643727</Latitude></Result></ResultSet>";

XmlSerializer serializer = new XmlSerializer(typeof(ResultSet));
ResultSet output;

using (StringReader reader = new StringReader(xmlSource))
{
    output = (ResultSet)serializer.Deserialize(reader);
}
Enrico Campidoglio
A: 

The XSD Code Generator in Liquid XML Studio does a great job of creating highly compliant c# or vb.net code from an XML Schema. This code can then be used to call or implement a web service.

If your implementing a web service then you can take control of the WSDL produced using XmlSchemaProvider and IXmlSerializable, see Taking Control of your WSDL

Colin