XmlDataDocument is obsolete

Ben Aminnia 21 Reputation points
2022-04-04T21:47:36.12+00:00

I was editing an old asp.net c# code and it shows this warning: XmlDataDocument is obsolete (but it is still working fine).

Should I keep that code as is? If not, how do I change is to a code which is not obsolete?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,648 questions
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 61,731 Reputation points
    2022-04-05T22:07:38.91+00:00

    there is no direct replacement. it was xml exchange between ado datasets and xml.

    as net 4.* is what is known as stable product (no feature changes), even though XmlDataDocument has been depreciated for over a decade, it is probably safe to use.

    when you start your migration to net 6+, then you should recode.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ben Aminnia 21 Reputation points
    2022-04-05T19:09:33.153+00:00

    XmlDocument Class shows .NET 6, but the app I was looking at is .NET 4.0. Does it need to be upgraded to .NET 6 first, or will XmlDocument Class work with .NET 4.0?

    0 comments No comments