Reading xml into LINQ format to check against log file data – Conditions in list format – linq not picking up reformated xml
I have a project that reads xml of expected build results for each build area, and compares against build logs to see if the build passed. Right now, the linq is showing each condition in a separate line of results, but (since I’m looping thru each linq result line to check for success) I need to be able to check both conditions (if there are two) at the same time, not different times. Otherwise I could be checking the wrong line of the log file. Note that sometimes there are two success criteria but not always. It’s just the two conditions I need to check at once.
To make this change, I moved my SuccessCriteria tag out of the Conditions tag and below Conditions. With that change, the linq isn’t picking up the xml lines. There should be about 69 lines of results_b with my full xml, but it’s picking up a couple sections I’m not showing that I left in the old format. I tried changing cName = (string)p.Attribute(“name”), to cName = (string)b.Attribute(“name”), in the LINQ but have the same results. The cValue was changed similarly at the same time.