how do I fix a xml error?

I inherited a console app that reads in an xml file. However, when I run the app, I get an error: "There is an error in XML document (2, 2)." The inner exception error is {"<ArrayOfQF_DOW_Weight xmlns=''> was not expected."}. I am attaching the xml file for viewing. I am a xml newbie so not real familiar.

thanks. WeightsAndAdders.xml
bschave2Asked:
Who is Participating?
 
bschave2Connect With a Mentor Author Commented:
i fixed this by using xml reader.
0
 
slightwv (䄆 Netminder) Commented:
If this is strictly XML related can I move this to more appropriate zones?
0
 
slightwv (䄆 Netminder) Commented:
The XML file looks correct.  What is throwing that error?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
bschave2Author Commented:
public class QfDowWeights
      {
            public List<QfDowWeight> DayOfWeekWeights { get; set; }
            public QfDowWeights()
            {
                  var dataFilePath = Environment.CurrentDirectory + "\\WeightsAndAdders.xml";
                  var serializer = new XmlSerializer(typeof(List<QfDowWeight>));

                  using (var fs = new FileStream(dataFilePath, FileMode.Open, FileAccess.Read))
                  {
                try
                {

                    DayOfWeekWeights = serializer.Deserialize(fs) as List<QfDowWeight>;
                }
                catch (Exception ex)
                {
                    throw (ex);
                }
                        fs.Close();
                  }
            }
      }
0
 
bschave2Author Commented:
List<QfDowWeight> has the three properties. dayofweek, lookbackday and weight....taking the xml data and putting it into list of the QfDowWeight object.
0
 
slightwv (䄆 Netminder) Commented:
I would like to move this to more appropriate zones.  It does not appear to be Oracle or ASP (the zone you selected is straight ASP not ASP.Net) related.
0
 
bschave2Author Commented:
nobody commented, so I figured it out for myself.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.