Simple specific classes design I am new to c#, and rather new to design-patterns. I want to create a simple and a most elegant solution for loading and validating a xml file and later on extracting its fields.
I've started with a generic IData interface, that gets implemented by a XmlFileData class, but I feel that there is much more to be improved upon, but I lack the knowledge to do it (from design, to naming variables and methods and so on).

So please, have no mercy !!

public interface IData
{
     String GetDataString();
}

class XMLValidator
    {
        private StringBuilder verificationErrorsList = new StringBuilder();
        public string ValidationSchema { get; set; }
        public String ValidationErrors
        {
            get { return verificationErrorsList.ToString(); }
        }
        public bool HasErrors
        {
            get {return (verificationErrorsList.Length &gt; 0);}
        }

        public void Validate(IData xmlData)
        {
            try
            {
                XmlWriterSettings ws = new XmlWriterSettings();
                ws.Indent = true;

                XmlReaderSettings rs = new XmlReaderSettings();
                rs.ValidationType = ValidationType.Schema;
                rs.ValidationEventHandler += new System.Xml.Schema.ValidationEventHandler(rs_ValidationEventHandler);
                rs.Schemas.Add(null, ValidationSchema);
                rs.CloseInput = true;

                rs.ValidationFlags = XmlSchemaValidationFlags.ReportValidationWarnings |  XmlSchemaValidationFlags.ProcessIdentityConstraints |
                               XmlSchemaValidationFlags.ProcessInlineSchema |  XmlSchemaValidationFlags.ProcessSchemaLocation;

                StringReader r = new StringReader(xmlData.GetDataString());
                using (XmlReader reader = XmlReader.Create(r, rs))
                {
                    try
                    {
                        while (reader.Read()) { }
                    }
                    catch (XmlException e)
                    {
                        verificationErrorsList.Append(e.Message);
                        verificationErrorsList.Append(Environment.NewLine);
                    }

                }
            }
            catch (XmlSchemaValidationException e)
            {
                verificationErrorsList.Append(e.Message + Environment.NewLine);
            }
        }
        void rs_ValidationEventHandler(object sender, System.Xml.Schema.ValidationEventArgs e)
        {
            if (e.Severity == XmlSeverityType.Error || e.Severity == XmlSeverityType.Warning)
            {
                verificationErrorsList.Append(e.Message + Environment.NewLine);
            }
        }
    }


Usage:

        IData data = new XmlFileData(basepathXML + fileNameXML);
        XMLValidator validator = new XMLValidator();
        validator.ValidationSchema = basepathXML + fileNameXSD;
        validator.Validate(data);
        if (validator.HasErrors)
        {
            Console.WriteLine(validator.ValidationErrors);
        }
        else
        {
            Console.WriteLine("Success");
        }
A few things:

IData is not a particularly good name for the interface as it represents a source of data rather than the data itself. Therefor IDataSource seems more appropriate.

The interface is a bit ambiguous - which method am I supposed to use GetDataStream or GetDataString? Why use one or the other? Could I call both multiple times and interchangeably?
As of now it doesn't really provide enough value to warrant it's existence. You'd be better of having XmlValidator accept a TextReader and let the calling code deal with how to wrap it around the source.

Consider passing the ValidationSchema as part of the constructor for the XmlValidator - it's an integral part of its validation logic.

In the validator when the reader throws an exception because there was a problem reading from the stream for example then you catch those as validation errors which I'd consider technically wrong. Your validator should catch validation errors - i.e. anything that has to do with invalid XML. Everything else should not be of its concern. So don't catch Exception - be more specific.