Click here to Skip to main content
15,886,842 members
Articles / Programming Languages / XML

XML Serializer Library

Rate me:
Please Sign up or sign in to vote.
4.92/5 (12 votes)
10 Dec 2007CPOL4 min read 60.3K   1.8K   66  
A library for serializing any class in XML format.
using System;
using System.Collections.Generic;
using System.Text;

using Globe.Xml.Serialization;
//using Globe.Xml.Serialization.CPlusPlus;

namespace XmlSerialization
{
    [XmlClassSerializable("department")]
    public class Department
    {
        public Department()
        {
            _serializableStruct.Value = "Serializable Struct";
        }

        [XmlFieldSerializable("name")]
        string _name = string.Empty;
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        [XmlFieldSerializable("serializableStruct")]
        SerializableStruct _serializableStruct;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Italy Italy
I am a biomedical engineer. I work in Genoa as software developer. I developed MFC ActiveX controls for industrial automation for 2 years and packages for Visual Studio 2005 for 1 year. Currently I'm working in .NET 3.5 in biomedical area.

Comments and Discussions