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 7778765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:28:48+00:00 2026-06-01T18:28:48+00:00

I have a XML file, with a structure like <items> <item> <someDetail> A value

  • 0

I have a XML file, with a structure like

<items>
  <item>
    <someDetail>
      A value here
     </someDetail>
  </item>
  <item>
    <someDetail>
      Another value here
     </someDetail>
  </item>
</items>

With multiple items in it.

I want to deserialize the XML on session start ideally, to turn the XML data to objects based on a class (c# asp.net 4)

I have tried several ways with either no success, or a solution which seems clunky and inelegant.

What would people suggest?

I have tried using the xsd.exe tool, and have tried with the xml reader class, as well as usin XElement class to loop through the xml and then create new someObject(props).

These maybe the best and/or only way, but with it being so easy for database sources using the entities framework, I wondered if there was a similar way to do the same but from a xml source.

  • 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-01T18:28:50+00:00Added an answer on June 1, 2026 at 6:28 pm

    The best way to deserialize XML it to create a class that corresponds to the XML structure into which the XML data will deserialize.

    The latest serialization technology uses Data Contracts and the DataContractSerializer.

    You decorate the class I mentioned above with DataMember and DataItem attributes and user the serializer to deserialize.

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

Sidebar

Related Questions

I have an XML structure that looks like this: <root> <index> <item>item 1</item> <item>item
I have an xml file nodes structure like this <Employee> <EmpId></EmpId> <EmpName></EmpName> <Salary> <Basic></Basic>
Possible Duplicate: Need help in structuring things in XML file have a structure like
I have a XML structure like the following: <Root> <Node Name=File System> <Node Name=C:\Windows\System32\drivers\etc\hosts>
I have an XML file format that contains a structure of questions: <question id=q101>
I have an xml file that contains a structure.. In this structure, I have
I have constructed an XML tree structure of an XML file. I am able
I have to parse a 1Gb XML file with a structure such as below
I have a large xml file (approx. 10 MB) in following simple structure: <Errors>
I have an XML file that looks like <?xml version='1.0' encoding='UTF-8'?> <root> <node name=foo1

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.