Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
33 Points
73 Posts
Apr 11, 2012 08:05 AM|LINK
Cool! Both works!
But i want to have a follow up question,
If I want to modify one of the item, say, Winter only,
How could I access this specified item?
The below is what i use after converting to VB
Dim xele As XElement = XElement.Load(MapPath("~\xml\course_desc.xml")) Dim xitems = (From x In xele.Descendants("showschedule").Descendants() _ Select New With { _ .Sqlname = x.Attribute("sqlname").Value, _ .Sqlshow = x.Attribute("show").Value, _ .Index = x.Attribute("index").Value, _ .Name = x.Attribute("name").Value _ }).OrderBy(Function(x) x.Index).ToList()
Bee90124
Member
33 Points
73 Posts
Re: LINQ to XML specific question on extracting data
Apr 11, 2012 08:05 AM|LINK
Cool! Both works!
But i want to have a follow up question,
If I want to modify one of the item, say, Winter only,
How could I access this specified item?
The below is what i use after converting to VB
Dim xele As XElement = XElement.Load(MapPath("~\xml\course_desc.xml")) Dim xitems = (From x In xele.Descendants("showschedule").Descendants() _ Select New With { _ .Sqlname = x.Attribute("sqlname").Value, _ .Sqlshow = x.Attribute("show").Value, _ .Index = x.Attribute("index").Value, _ .Name = x.Attribute("name").Value _ }).OrderBy(Function(x) x.Index).ToList()