 |
Serializing abstract classes to XML
Dave Howard (5931 views)
Serializing abstract classes to XML
Digg it: http://digg.com/programming/Serializing_abstract_classes_to_XML_in_c
It is often useful to have abstract classes with several derived types to allow use of strongly typed lists and the such.
For example you might have a DocumentFragment class w
|
 |
Sorting an XML document in C# using XSL
Paul Hayman (4212 views)
Sorting an XML document in C# using XSL
I needed to sort some XML in C# before itterating through the document. In the end I used the XslCompiledTransform to apply an XSL stylesheet to the XML document. Works very quickly. For reference, this is how I did it.
The code
The following uses
|
 |
class.Serialize()
Paul Hayman (3023 views)
class.Serialize()
Handly little function which I include in most classes. This function returns the object serialized as XML, perfect for logging etc.
#c#/// <summary>
#c#/// Serialize this object
#c#/// </summary>
#c#/// <returns>XmlDocument containing the current information serialized<
|