faracomleather
New Member
This is the XML I am trying to parse: http://pastebin.com/5mCqHQr3This is the code used to parse the above XML document:\[code\] // LINQ code to read the XML document XDocument xmlDoc = XDocument.Parse("<?xml version=\"1.0\"?>" + xml); // create the LINQ datasource System.Diagnostics.Debug.Write(xml); var query = from MWSdata in XElement.Parse("xml").Elements("AttributeSets") select MWSdata; foreach (var data in query) { System.Diagnostics.Debug.Write(data); }\[/code\]The full error is: Data at the root level is invalid. Line 1, position 1. (on the -var query statement). How do I fix this? I'm trying to get to each of the element's values (ns2:Author, ns2:Title, etc) and place them in textboxes.The program is written in C# .NET...