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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:14:28+00:00 2026-05-17T06:14:28+00:00

I am using the .NET 4.0 Framework. I need to write some XML to

  • 0

I am using the .NET 4.0 Framework. I need to write some XML to interact with a web service. The parameters passed to the web service will be entered by an end-user.

My question is, what is the recommended approach for interacting with XML these days? It seems with every version of the .NET Framework there is a new way to do the same thing. But that doesn’t necessarily mean that it is the best. What does the community recommend in this case?

  • 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-17T06:14:29+00:00Added an answer on May 17, 2026 at 6:14 am

    There isn’t a new one in every version. There are only two. It is unfortunate that there should be two, but there certainly aren’t more than two.

    The one I recommend is System.Xml.Linq.XDocument and its associated classes. They provide a clean, useful API which allows you to use LINQ and the Enumerable extension methods. Generating an XML tree in this API is easy because you can nest constructor calls and you end up with code that looks very much like the XML itself.

    The one I don’t recommend is System.Xml.XmlDocument. It is old, and it was designed to follow the W3C recommendations for an XML API. Consequently, it has no support for any modern or C#-specific ideas, including enumerables and LINQ. Generating an XML tree in this API is tortuous: you have to create each element individually and call methods like AppendChild to turn them into a tree.

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

Sidebar

Related Questions

I'm writing out some xml from C# using the .net framework's XmlTextWriter. This works
Using C# and the .Net framework 2.0. I have an MDI application and need
I'm developing an application targeting .NET Framework 2.0 using C# for which I need
I need to add some metrics and statistics capabilities in ASP.NET application (Framework 2.0,
I am developing a website using Asp.Net MVC framework. We need to add general
I am using .Net framework 2.0 / jQuery to make an Ajax call to
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework
I wonder if is possible to use FTS with LINQ using .NET Framework 3.5.
We have an application written in C#, using .NET Framework 3.0 or 3.5 or
Using the .net framework you have the option to create temporary files with Path.GetTempFileName();

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.