<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rakesh Rajan's blog : .NET</title><link>http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET/default.aspx</link><description>Tags: .NET</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Class to Xml tool (test version)</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2006/02/18/84120.aspx</link><pubDate>Sat, 18 Feb 2006 15:15:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:84120</guid><dc:creator>rakeshrajan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/rakeshrajan/rsscomments.aspx?PostID=84120</wfw:commentRss><comments>http://msmvps.com/blogs/rakeshrajan/archive/2006/02/18/84120.aspx#comments</comments><description>&lt;H1&gt;Summary &lt;/H1&gt;
&lt;P&gt;CTX (Class to Xml) tool is a very simple tool which provides you a code editing environment in C# and VB.NET, compiles the source codes and lets you see the Xml output of all serializable types once successfully compiled. &lt;/P&gt;&lt;BR&gt;&lt;a href="http://msmvps.com/photos/rakesh_rajans_blog/images/84118/original.aspx" target=_blank&gt;&lt;IMG src="/photos/rakesh_rajans_blog/images/84118/500x358.aspx" border=0&gt; &lt;/A&gt;
&lt;H1&gt;Intro&lt;/H1&gt;
&lt;P&gt;Do you use Xml Serialization in .NET – if yes, you might be interested in this tool! &lt;/P&gt;
&lt;P&gt;Have you ever thought "Hmm…now that I have written a serializable class, I wonder how will it look when it is Xml Serialized"? &lt;/P&gt;
&lt;P&gt;If yes, you are in good company :). Sometime back I was involved in a project in which I had to develop a lot of business entity classes which would be Xml Serialized. Since these classes had to adhere to a specific schema, I had a tough time synchronizing the Xml Attributes and the final xml schema it generated when xml serialized. &lt;/P&gt;
&lt;P&gt;The sequence of how I would go about doing this was like this: 
&lt;OL&gt;
&lt;LI&gt;I would develop a draft version of xml schema. 
&lt;LI&gt;I would create a simple console project in which I would start writing the class to be serialized. 
&lt;LI&gt;This project will have a small code snippet which will create an instance of the serializable class and xml serialize it and then finally print out the xml output. 
&lt;LI&gt;I will keep comparing this output with my xml schema until they are in sync.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;As I got involved in more and more projects (many of them my own :) ) which came to have similar requirements, I decided to create a little tool which would automate the above tasks. &lt;/P&gt;
&lt;P&gt;Introducing the Class to Xml (CTX) tool - a very simple tool which provides you a code editing environment in C# and VB.NET, compiles the source codes and lets you see the Xml output of all serializable types once successfully compiled. &lt;/P&gt;
&lt;H1&gt;How to use the tool&lt;/H1&gt;
&lt;P&gt;
&lt;OL&gt;
&lt;LI&gt;Open up the source code files of the serializable classes you want to get the xml for (including all the files that are referenced) and select the language. 
&lt;LI&gt;Press F5. The whole list of files will be compiled. 
&lt;LI&gt;If compilation is successful, the Output pane would list all serializable types available in the assembly. If compilation failed, the Errors pane would list the errors. 
&lt;LI&gt;After successful compilation, select the required serializable type in the combo box; the Xml representation is displayed in the Serialized Xml text box. &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;
&lt;H1&gt;Download&lt;/H1&gt;
&lt;P&gt;The current test version&amp;nbsp;source code (probably terrible) in Visual Studio 2005 is available here &lt;B&gt;(The site is down due to site maintenance, please wait while I resolve this ASAP)&lt;/B&gt;.&lt;BR&gt;Do check it out and let me know your comments. &lt;/P&gt;
&lt;P&gt;I plan to finalize the code soon…er, I have no idea how “soon” though&amp;nbsp;:) &lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=84120" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET+2.0/default.aspx">.NET 2.0</category></item><item><title>Just posted a new article - Delegate and Events Internals</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/10/07/69432.aspx</link><pubDate>Fri, 07 Oct 2005 11:46:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:69432</guid><dc:creator>rakeshrajan</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/rakeshrajan/rsscomments.aspx?PostID=69432</wfw:commentRss><comments>http://msmvps.com/blogs/rakeshrajan/archive/2005/10/07/69432.aspx#comments</comments><description>Check it out here: &lt;BR&gt;&lt;A href="http://www.codeproject.com/useritems/DelegatesNEventsInternals.asp" target=_blank&gt;http://www.codeproject.com/useritems/DelegatesNEventsInternals.asp&lt;/A&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=69432" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/rakeshrajan/archive/tags/Personal/default.aspx">Personal</category></item></channel></rss>