Project Description

YAXLib is a flexible XML serialization library that lets developers design freely the XML file structure, choose among private and public fields to be serialized, and serialize all known collection classes and arrays (single-dimensional, multi-dimensional, and jagged arrays) in the .NET Framework.

YAXLib can be used as a powerful XML parser or generator, that exploits the object to XML mapping in the class definitions themselves.

The exception handling policies and its missing data recovery capabilities makes YAXLib a reliable tool for XML configuration storage and retrieval.

GitHub: YAXLib is also hosted on GitHub, so feel free to fork the library either on CodePlex or GitHub. This is the address to YAXLib repository on GitHub:
https://github.com/sinairv/YAXLib 

Features

  • Allowing the programmer to format the XML result as desired
  • Support for specifying path-like serialization addresses, e.g., elem1/elem2/elem3, and ../elem1, and ./elem1
  • Support for XML namespaces
  • Serialization and deserialization of all known generic and non-generic collection classes in System.Collections, and System.Collections.Generic
  • Support for serialization of single-dimensional, multi-dimensional, and jagged arrays
  • Support for recursive serialization of collections (i.e., collection of collections)
  • Support for specifying aliases for enum members
  • Support for defining user-defined custom serializer for specific types or specific fields
  • Allowing the programmer to choose the fields to serialize (public, or non-public properties, or member variables)
  • Support for serialization and deserialization of objects through a reference to their base-class or interface
  • Support for multi-stage deserialization
  • Allowing the programmer to add comments for the elements in the XML result
  • and more ...


See the accompanied demo application for an example of each functionality.

Documentation

The best documentation for YAXLib is its various samples and unit-tests. However this (rather old) CodeProject article is a good source to start. The article is also found in the Doc folder of the source code.

To play with sample classes, open one of the solution files (based on version of your Visual Studio), go to YAXLibTests project, SampleClasses folder. If you want a sample class to appear in the demo application simply put a [ShowInDemoApplication] attribute on top of the class definition. In the demo application you can see the serialization result, modify it, and test its deserialization.

Nuget

To install YAXLib, run the following command in the Package Manager Console:
PM> Install-Package YAXLib

Last edited Oct 2, 2012 at 3:02 PM by sina_iravanian, version 12