Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7944703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:37:53+00:00 2026-06-04T00:37:53+00:00

I have to create an serializable class which has and xml in the format

  • 0

I have to create an serializable class which has and xml in the format mentioned below. Please check the xml on this link and the ExtendedAttribute Element.

http://telligent.com/community/developers/w/developer6/update-a-user.aspx

The following tag is formed as and key value pair and does not have an object

My ExtendedAtribute class is not a fixed class but its an key value type object which may increase and decrease dynamically

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:37:55+00:00Added an answer on June 4, 2026 at 12:37 am

    For the reduced XML File:-

    <ExtendedAttributes>
      <EnableDisplayName>True</EnableDisplayName>
      <EditorType>Enhanced</EditorType>
      <EnableConversationNotifications>True</EnableConversationNotifications>
      <EnableUserSignatures>True</EnableUserSignatures>
      <CPPageSize>10</CPPageSize>
      <EnableActivityMessageNewUserAvatar>True</EnableActivityMessageNewUserAvatar>
      <EnableActivityMessageThirdPartyMessageType>True</EnableActivityMessageThirdPartyMessageType>
      <EnableStartConversations>1</EnableStartConversations>
      <avatarUrl>~/cfs-file.ashx/__key/communityserver-components-selectableavatars/03b2c875-fbfb-4d26-8000-ef001b9f4728/avatar.png</avatarUrl>
      <EnableActivityMessageNewProfileComment>False</EnableActivityMessageNewProfileComment>
      <EnableActivityMessageStatus>True</EnableActivityMessageStatus>
    </ExtendedAttributes>
    

    You can parse it with:-

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Xml.Serialization;
    
      [XmlRoot("ExtendedAttributes")]
      public class SerialisableDictionary : Dictionary<string, string>, IXmlSerializable
      {
        #region IXmlSerializable Members
        public System.Xml.Schema.XmlSchema GetSchema()
        {
          return null;
        }
    
        public void ReadXml(System.Xml.XmlReader reader)
        {
          reader.Read();
          while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
          {
            string key = reader.Name;
            this.Add(key, reader.ReadElementContentAsString());
            reader.MoveToElement();
          }
          reader.ReadEndElement();
        }
    
        public void WriteXml(System.Xml.XmlWriter writer)
        {
          // TODO
        }
        #endregion
      }
    
      class Program
      {
        static void Main(string[] args)
        {
          SerialisableDictionary sd = new SerialisableDictionary();
          XmlSerializer x = new XmlSerializer(sd.GetType());
          using (StreamReader sr = new StreamReader(@"XMLFile1.xml"))
          {
            sd = (SerialisableDictionary)x.Deserialize(sr);
          }
          foreach(var kvp in sd)
          {
            Console.WriteLine(kvp.Key + " = " + kvp.Value);
          }
          Console.WriteLine("Done.");
          Console.ReadKey();
        }
      }
    

    This gives you a Dictionary<string, string> you almost certainly want the true/false/string/number values parsed, but that’s another problem.

    I appreciate this isn’t perfect, but it should be enough to get you going. Unfortunately it will get quite involved and I don’t have much time.

    All based heavily on the answer in Serialize Class containing Dictionary member

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following class which I want to serialize to XML: <Serializable()> _
I have a class with numerous Nullable<T> properties which I want to be serializable
In my project I have a class which I Serialize in Binary format to
I have a class which has a number of public fields that are marked
I have a GWT serializable class, lets call it Foo. Foo implements IsSerializable, has
I have create my own NSOpenGLView class, right now the data that i want
I have create name range on sheet A so I need to use this
i have create a form (so it's PHP and HTML hybrid-code). it has ability
I have create a listfragment and a button which looks like as follows (
I have create an array containing person firstname,lastname and number which i populate in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.