Technology is not science. RSS Feed

The nil attribute in XML-serialized nullable values
28 May 2008, 07:57:00 PM
If in a class you have a value type property that is optional, it's common to specify it as nullable. However, if you serialize a nullable value type property to XML, you'll get something like this if it's null. <Value xsi:nil="true&quo ...
Read post

Removing the XML schema and instance namespace declarations
21 May 2008, 07:20:00 PM
To remove the declarations of the XML schema (xsd) and schema instance (xsi) namespaces from the output file of XML-serialized objects, create an XmlSerializerNamespaces object and add an empty namespace to it. XmlSerializerNamespaces ns = new ...
Read post

XML-serializing a derived collection
14 May 2008, 05:27:00 PM
A class derived from a collection class will XML-serialize only the collection, not any additional properties in your derived class. public class NamedNodeList : List<Node>{    public string Name { get; set; } // ignored during XML serial ...
Read post