Title: XMLConfig
Author: David J. Stein, Esq.
Version: 1.0 - last updated Tuesday, May 10, 2011
Abstract: XMLConfig is an XML serialization API for the .Net platform with some advantages over the XmlSerializer built into .Net. for example:
- XMLConfig is a hybrid serializer. Standardized types (primitive types, strings, standard collections, and objects) are serialized using a human-readable, structured XML syntax. Non-serializable objects (e.g., Bitmaps) are serialized as binary objects (using the standard .Net BinarySerializer), and are then included in the regular XML structure of the object set as CDATA. This is a vast improvement over the standard .Net serializers, which are either entirely XML or entirely binary.
- XMLConfig can serialize object sets that do not have a strictly hierarchical structure, such as object sets with circular references. This is a significant improvement over the .Net XML serializer, which cannot handle non-strictly-hierarchical data sets.
- XMLConfig serializes arrays, List objects, and Dictionary objects using the native hierarchical structure of the XML document. By contrast, the native XML serializer doesn't ues this efficient mechanism for arrays or List objects, and cannot serialize Dictionary objects at all.
- XMLConfig allows objects to participate in the serializion process by specifying whicih members are to be put into the XML document how such members are to be formatted (e.g., encrypting strings), and how the data in the XML document is to be transferred back into the members upon reading the class. (Moreover, the API makes this participation as simple as possible.) This degree of control enables more options than the native XML serializers, which are fully automated. For example, the XMLSerialize cannot access any private or protected class member, but because the XMLConfig relies on the class to handle the data transfer, private and protected members can easily be serialized alongside publicly accessible members.
Installation Instructions: Simply add a reference in your porject to the XMLConfig.dll library. You can then utilize the syntax of the XMLConfig API to perform serialization and deserialization functions.
Executing the included "XMLConfigDemo.exe" binary will preesent a demonstration of the functionality and capabilities fo teh XMLConfig serialization API.
Operating Instructions: XMLConfig is provided as a standard API that can be referenced from any standard .Net project. Refer to the included documentation for information on the structure of the API.
XMLConfig also provides an XMLConfig Demo project that demonstrates (and also tests and proves) the functionality and capabilities of the XMLConfig API. This demo project includes a set of sample classes, each having particular nuances (such as polymorphism, non-hierarchical references, and various uses of null values). The demo project permits the generation of an object set including these members, the serialization of this object set to an XMLConfig file, and the deserialization of the object set from the XMLConfig file.
Comments: This project was conceived to solve the standard problem of serializing an object set defining the configuratino information for an application. However, the API may be used to save any type of object set for any reason.
XMLConfig was also built to address the fundamental deficiencies in the .Net serialization classes. Many other solutions and projects were explored before this project was undertaken. It is hoped that the XMLConfig API provides an interesting and advantageous alternative for some projects.
Application History:
- Version 1.0 (5/10/2011): Initial release.
Questions/Comments: Please contact David J. Stein, Esq. via email at djs10@po.cwru.edu.
Terms and Conditions of Use:
Please see the enclosed "License.html" file for terms and conditions of use of this software package.