the method is exactly the same however you select month + day:
Code:Dim monthString As String = "_" & now.month.ToString("00") Dim month As XElement = xml.Root.Element(monthString) If month IsNot Nothing Then Label1.Text = month.Elements("_" & now.day.ToString("00"))(0).Element("Morning").Value Label2.Text = month.Elements("_" & now.day.ToString("00"))(0).Element("Noon").Value Label3.Text = month.Elements("_" & now.day.ToString("00"))(0).Element("Afternoon").Value Label4.Text = month.Elements("_" & now.day.ToString("00"))(0).Element("Sunset").Value Label5.Text = month.Elements(("_" & now.day.ToString("00"))(0).Element("Night").Value End If




Reply With Quote