What is your favorite way to read XML files using C#?

Posted by stacker on Stack Overflow See other posts from Stack Overflow or by stacker
Published on 2010-05-04T21:58:03Z Indexed on 2010/05/05 0:28 UTC
Read the original article Hit count: 462

Let's take this xml structure as example:

<?xml version="1.0" encoding="utf-8"?>
<Configuration-content>
  <XFile Name="file name 1" />
  <XFile Name="name2" />
  <XFile Name="name3" />
  <XFile Name="name4" />
</Configuration-content>


public class Configuration
{
    public XFile[] Files { get; set; }
}

public interface IConfigurationRipository
{
    Configuration Get();
    void Save(Configuration entity);
}

I wonder what's the best way to do that.

The task is to implement IConfigurationRipository using your favorite approach.

© Stack Overflow or respective owner

Related posts about c#

Related posts about linq-to-xml