Linq to xml
-
Can someone please send me in the correct direction on this problem. This is related to another post that I made but it was obviously not clear. I need the value based on the other elements surrounding it. I have been able to retrieve HS But I cannot get only the value HS. I could parse this but I think that I am just not doing something correctly... This is the equivalent sudo SQL SELECT value FROM xmldocuement.johnr WHERE setting = "frmMainForm" AND key = "LastLocale" Database DatabaseHost localhost frmMainForm GridMode T I need to know what this Value is using the UserName,Setting, and Key frmMainForm LastLocale HS frmMainForm LastLocale HS Any help would be so appreciated.:confused: Humble Programmer
-
Can someone please send me in the correct direction on this problem. This is related to another post that I made but it was obviously not clear. I need the value based on the other elements surrounding it. I have been able to retrieve HS But I cannot get only the value HS. I could parse this but I think that I am just not doing something correctly... This is the equivalent sudo SQL SELECT value FROM xmldocuement.johnr WHERE setting = "frmMainForm" AND key = "LastLocale" Database DatabaseHost localhost frmMainForm GridMode T I need to know what this Value is using the UserName,Setting, and Key frmMainForm LastLocale HS frmMainForm LastLocale HS Any help would be so appreciated.:confused: Humble Programmer
Assuming you have the data in a variable named
xmlData
, you should need something like this:Dim value = From elem In xmlData.<johnr> _
Where elem.<setting>.Value = "frmMainForm" AndAlso _
elem.<key>.Value = "LastLocale" _
Select elem.<value>.Value