CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of serialization
C#
public XDocument ResponseXml { get; protected set; }
 
public T Inflate<T>() where T : class
{
   var attr = typeof(T)
      .GetCustomAttributes(true)
      .OfType<XmlRootAttribute>()
      .SingleOrDefault();
 
   string root = attr.ElementName;
by John Nelson   June 25, 2010 @ 6:52am
146 Views
no comments
 
'Form1.vb
#Region " Import Declaratives "
 
Imports DevExpress.XtraEditors
Imports DevExpress.Utils.Menu
Imports System.IO
Imports System.Xml.Serialization
 
#End Region
by Thom Lamb   February 11, 2010 @ 6:53am
2635 Views
no comments
 
C#
Serialize (convert an object instance to an XML document):
 
// Assuming obj is an instance of an object
XmlSerializer ser = new XmlSerializer(obj.GetType());
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter writer = new System.IO.StringWriter(sb);
ser.Serialize(writer, obj);
XmlDocument doc = new XmlDocument();
doc.LoadXml(sb.ToString());
by Sridhar   December 28, 2009 @ 2:39pm
265 Views
no comments
 
C#
/// <summary>
/// Static class that provides services to serialize and deserialize an IDynamiteXml.
/// </summary>
public static class DynamiteXmlLogic
{
    /// <summary>
    /// Service to serialize an IDynamiteXml implementing object.
    /// Use the Deserialize method of this class to get the IDynamiteXml back.
    /// </summary>
    /// <param name="DynamiteXml">
by Athens Springer   December 17, 2009 @ 10:42pm
213 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate