Last post Dec 09, 2011 07:45 AM by Radu Florescu
May 19, 2009 01:08 AM|ishtiaq.NET|LINK
May 19, 2009 05:06 AM|tompy_nation|LINK
May 19, 2009 07:33 AM|kavita_khandhadia|LINK
U can do more thing also.. from the xsd class u can create an c# class file (in .net IDE 2005 this fcility is given)
now using this class u can create an object and fill the data in the object.. now u can serilize it back to normal string.. load it in the xmlDOm object and use it furthure.
May 19, 2009 07:36 AM|Martin_Honnen|LINK
The .NET framework SDK has a command line tool named
xsd.exe that allows you to create .NET class code in C# or VB.NET from your XSD schema document. You can then compile those classes and use them in your .NET code to create and populate instances of the classes which can be serialized to XML using
May 27, 2009 05:17 AM|alhambraeidos|LINK
Please, any sample code for create and populate classes and serializer it ?
May 27, 2009 05:57 AM|kavita_khandhadia|LINK
To serlize any Serilizabele object use this function
/// Serialize given object into XmlElement.
/// <param name="transformObject">Input object for serialization.</param>
/// <returns>Returns serialized XmlElement.</returns>
#region Serialize given object into stream.
public XmlElement Serialize(object transformObject)
XmlElement serializedElement = null;
MemoryStream memStream = new MemoryStream();
XmlSerializer serializer = new XmlSerializer(transformObject.GetType());
memStream.Position = 0;
XmlDocument xmlDoc = new XmlDocument();
serializedElement = xmlDoc.DocumentElement;
catch (Exception SerializeException)
this.BrokenRules.Add(399, "CleartripHotels : Error in Serialization of object. " + SerializeException.Message, TextType.Error, ErrorWarningType.Execution);
try to serilize an objecy of DataTable... u will have an idea...
it will give u an xml of the DataTable
Let me know if u din get this.
Nov 17, 2010 12:27 AM|saurabhxp|LINK
I have used this code.. but where does the new xml file get stored???
Dec 10, 2010 03:37 AM|maxin|LINK
It is very good example.
But my question is how to make the object "transformObject" by using the C# class when we use the above code.
Do you have an example?
Sep 20, 2011 07:34 AM|gahlouta|LINK
But what if, I want to create the XMl instance from the XSD file at run time.
Means i will create class files from xsd at run time. but how can i make the object of these newly created class at that time......????
Dec 09, 2011 07:45 AM|Radu Florescu|LINK
The XML is stored in memory stream, in the memory of the server.