Guys,
I have to take a project from 3.5 down to 3.0.
The 3.5 project is making use of the linq.xdocument in the following code, can somebody show how I do this in 3.0 please?
I've replaced the xdocument with xmldocument, but the ".Descendants" is giving me erros now obviously.
Ta
Bob
Code:'This gets the questions with any completed data. Dim document As XmlDocument = XmlDocument.Load(Session("str_XMLDataFile")) Dim sectionName As String = XPathBinder.Eval(DataBinder.GetDataItem(e.AccordionItem), "@SectionName").ToString() Dim questions = From question In document.Descendants("Question") _ Where question.Parent.Attribute("SectionName").Value = sectionName _ Select Text = question.Element("Text").Value, _ Comment = question.Element("Comment").Value, _ VDSCode = question.Element("VDSCode").Value, _ Category = question.Element("Category").Value, _ YesNo = question.Element("YesNo").Value




Reply With Quote