Parse XML into accordion/treeview

I deserialized the xml. See if you can create the treeview yourself from the classes

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;

namespace ConsoleApplication9
    class Program
        static string FILENAME = @"c:\temp\test.xml";
        static void Main(string[] args)
            XmlReader reader = XmlReader.Create(FILENAME);
            XmlSerializer serializer = new XmlSerializer(typeof(VersionHistory));
            VersionHistory versionHistory = (VersionHistory)serializer.Deserialize(reader);
    public class VersionHistory
        public List<Version> versions { get; set; }
    public class Version
        public string id { get; set; }

        public string CCNumber { get; set; }

        public string Description { get; set; }

        public List<Changes> changes { get; set; }
    public class Changes
        public int id { get; set; }

        public string note { get; set; }

        public string value { get; set; }

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top