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

  • SEARCH
  • Home
  • 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 5980407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:47:46+00:00 2026-05-22T21:47:46+00:00

EDIT 2 I am updating the question again to more simply explain what I

  • 0

EDIT 2

I am updating the question again to more simply explain what I need.
I need to take any EntityObject in my application, convert it to XML, which can be reconverted back to AN object later that can be queried or used in a DataSource. I cannot reconvert to the original EntityObject because the structure of that object may have changed. Is this doable?

Original Question below

Let’s assume for a second that I am required by someone higher up than me (because I am) to take an EntityObject and convert it to a DataTable. The example I was sent on how to do it is from 2006 and uses a custom class (which my boss thought was built into .Net) and it doesn’t work anyway.

Is there a way to do this without writing my own custom class? Something as simple as “new DataTable(myEntityObject)” would be amazing. I’m guessing no though.

EDIT
I have changed the question because I was given the criteria wrong. Mainly we want our EntityObject to be XML so it can be stored in a database and reconstructed later. Can that be done via Serialization?

  • 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-05-22T21:47:47+00:00Added an answer on May 22, 2026 at 9:47 pm

    To answer your updated question:
    Use the XmlSerializer

    public XElement XmlSerialize(object o)
            {
                XmlSerializer serializer = new XmlSerializer(o.GetType());
                using (StringWriter sw = new StringWriter())
                {
                    serializer.Serialize(sw, o);
                    return XElement.Parse(sw.ToString());
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT : UPDATING MY QUESTION FOR MORE CLARIFICATION ========================================================== I use MeioUpload to upload
Edit : updating generalized question to reflect actual domain: sport of hockey. The actual
EDIT: Ok so I'm updating this question, to show what I've built as I've
OK so I've been tasked with upgrading an application which involves updating schema in
I have this action for updating data: def edit @project = Project.find(params[:id]) if @project.team
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT: I was an idiot. I simply had an image that was vertically long,
Edit (updated question) I have a simple C program: // it is not important
EDIT: Simple version of the question: I want to create server variables in the
I have been developing Android application, and I have one question - ListView uses

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.