Ok, so I've got this code and it works great with the fact that it does exactly what I want, except for the fact that it'll only work with one node then move where I need it to work with one node then run the check again for any nodes after that one that have the same value in an attribute. The idea behind this is:
the ListItem has an attribute with a program location and what time to start/end the specified program.
Any idea what direction I need to go for this to work through the full document?
vb Code:
Dim iTime As String = hours & ":" & minutes & ap Try Dim xml As XDocument = XDocument.Load(xmlDatabase) Dim e = From element In xml.Root.Elements("ListItem") Where (element.Attribute("StartTime").Value = iTime) Select element Dim ex As XAttribute = e.Attributes.ElementAt(2) Dim sTime As String = ex.Value If iTime.Equals(sTime) Then Dim ax As XAttribute = e.Attributes.ElementAt(1) Process.Start(ax.Value) End If Catch End Try


Reply With Quote