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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:10:54+00:00 2026-06-01T10:10:54+00:00

Working with C# Visual Studio 2008, MVC1. I’m creating an xml file by fetching

  • 0

Working with C# Visual Studio 2008, MVC1.

I’m creating an xml file by fetching one from a WebService and adding some nodes to it. Now I wanted to deserialize it to a class which is the model used to strongtyped the View.

First of all, I’m facing problems to achieve that without storing the xml in the filesystem cause I don’t know how this serialize and deserialize work. I guess there’s a way and it’s a matter of time.

But, searching for the previous in the web I came accross LINQ to XML and now I doubt whether is better to use it.

The xml would be formed by some clients details, and basically I will use all of them.

Any hint?

Thanks!!

  • 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-01T10:10:55+00:00Added an answer on June 1, 2026 at 10:10 am

    You can save a XElement to and from a MemoryStream (no need to save it to a file stream)

     MemoryStream ms = new MemoryStream();
     XmlWriter xw = XmlWriter.Create(ms);
     document.Save(xw);
     xw.Flush();
    

    Then if you reset the position back to 0 you can deserialize it using the DataContractSerializer.

     ms.Position = 0;
     DataContractSerializer serializer = new DataContractSerializer(typeof(Model));
     Model model = (model) serializer.ReadObject(ms);
    

    There are other options for how serialization works, so if this is not what you have, let me know what you are using and I will help.

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

Sidebar

Related Questions

I'm coming from Eclipse, working in Visual Studio 2008 Express and just want to
I'm working with Visual studio 2008. I have a form inherited from DockContent class
I am working in Visual studio-2008(VSS). Now i need to get file, which are
What is a good setup for .hgignore file when working with Visual Studio 2008?
Working in Visual Studio 2008. I'm trying to draw on a PNG image and
I am working in Visual Studio 2008 on an ASP.NET application, which has been
I'm working in Visual Studio 2008 and I would like for Edit > Outlining
I'm working in Visual Studio 2008 using c#. Let's say I have 2 xsd
I'm working with visual studio 2008 developing software for windows CE 6.0, compact framework.
For example if I'm working on Visual Studio 2008, I want the values devenv

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.