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.

My question is, how do I change the LINQ to pick up the full xml file, and the groupBy_b to check both conditions at once? I want to have the conditions together in a list but have the other data around it like build machine, process name, and success criteria.
For example, the table I put in xml looks like this for some of the log, ParseISLogStats (so I need to check BuildProject and BaseBuildArea are correct together in the log because they are different columns, but the success criteria is only one for those two conditions):

ParseISLogStats    Desctiption=nightly v17 partb   Projects=8   Status=Success
ParseISLogStats    Description=nightly v17 partb   Projects=8   Status=Success
ParseISLogStats    Description=nightly v17         Projects=33  Status=Success

I’ve been looking at these examples:
linq
linq

So far I have this code (with added groupBy to try and get conditions into a list together):

void ReadXml()
{
    int i_results = 0; //0 is successful for all; if it increases we have failed in one
    XmlDocument xml = new XmlDocument();
    string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
    string newPath = Path.GetFullPath(Path.Combine(path, @"...."));
    string finalPathXmlb = Path.GetFullPath(Path.Combine(newPath, @"BuildVerificationBuildAttributes_b.xml")); //new format

    teamPost = "";

    //linq 
    XDocument xmlDoc2 = XDocument.Load(finalPathXmlb);
    //XElement buildVerificationElement = xmlDoc1.Element("BuildVerification");
    //IEnumerable<XElement> buildElements = buildVerificationElement.Elements("build");
    //IEnumerable<XElement> buildMachines = buildElements.Elements("BuildMachine");

    //get just the times from the xml
    //var codeFreezeTime = xmlDoc1.Descendants("codeFreezeTime").First()?.Value;
    //logToFileAndScreen(codeFreezeTime);

    //get build info from xml, such as process (log name), condition, successCriteria, build machine, start time header, 
    IEnumerable<XElement> processes = buildMachines.Elements("Process");

    var results_b =
        xmlDoc2.Descendants("build")
        .SelectMany(b => b.Descendants("Process")
        .SelectMany(p => p.Descendants("Condition")
        .SelectMany(c => c.Descendants("SuccessCriteria")
        .Select(sc => new
        {
            buildMach = (string)b.Element("BuildMachine"),
            p1 = (string)p.Element("ProcessName"),
            startTimeHeader = (string)p.Element("startTimeHeader"),
            cName = (string)c.Attribute("name"),
            cValue = (string)c.Attribute("value"),
            f1 = (string)sc.Element("field"),
            c1 = (string)sc.Element("comparison"),
            v1 = (string)sc.Element("value")
        })))).ToList();
    
    var groups_b = results_b.GroupBy(x => new { build_machine = x.buildMach, process_name = x.p1, name = x.cName }).ToList();
} //ParseLogFile

I want my groups_b to look like this (but with the linq not working it will never do that, but I don’t think I have it correct in my groups_b either if the linq did work):

{buildMach = mach64, p1=ParseISLogStats, startTimeHeader = StartTime, {cName=Description, cValue=nightly v17 partb, cName=Projects, cValue=8}, f1=Status, c1=equal, v1=Succcess}
{buildmach = mach64, p1=ParseISLogStats, startTimeheader = StartTime, {cName=Description, cValue = nightly v17, cName=Projects, cValue=33},f1=status, c1=equal, v1=Success}

This is what my xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<BuildVerification>
    <codeFreezeTime>19:00</codeFreezeTime>
    <build>
        <BuildMachine>mach31</BuildMachine>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperRfilename1.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperRfilename2.cs">
                        </Condition>
                    </Conditions>
                        <SuccessCriteria>
                            <field>Status</field>
                            <comparison>equal</comparison>
                            <value>Success</value>
                        </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperRfilename3.h">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                            <field>Status</field>
                            <comparison>equal</comparison>
                            <value>Success</value>
                    </SuccessCriteria>
            </Process>

        </build>
        
        <build>
        <BuildMachine>mach46</BuildMachine>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKfilename4.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKfiename5.h">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKfilename6.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                            <field>Status</field>
                            <comparison>equal</comparison>
                            <value>Success</value>
                    </SuccessCriteria>
            </Process>
            
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperDfilename7.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKKfilename8.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKKfilename9.h">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            
                        
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKKfilename11.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> <!--can't use >= here -->
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKfilename22.cs">   
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinFileVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='VersionFile' value="\viewBuild_NightlyDeveloperKfilename33.cs">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            
            
            <Process>
                <ProcessName>SpinISProjectVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='ProductName' value="P1">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinISProjectVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='ProductName' value="P2">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>SpinISProjectVersionStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='ProductName' value="P3">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>GetSWStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='DestinationPath' value="D:BuildsRetailnightly">
                        </Condition>
                        <Condition
                            name='DestinationPath' value="D:BuildsRetailnightly">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison>
                        <value>Successful</value>
                    </SuccessCriteria>
            </Process>
            
            <Process>
                <ProcessName>ParseISLogStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='Nightly' value="D:nightly V17">
                            </Condition>
                        <Condition
                            name='Projects' value=33>
                            
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>ParseISLogStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='Nightly' value="D:nightly V17 partb">
                        </Condition>
                        <Condition
                            name='Projects' value=8>
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>ParseISLogStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='BuildProject' value="DInstallerBuild">
                        </Condition>
                        <Condition
                            name='BaseBuildArea' value="D:R_BuildsKv2.1nightly">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                        <field>Status</field>
                        <comparison>equal</comparison> 
                        <value>Success</value>
                    </SuccessCriteria>
            </Process>
            <Process>
                <ProcessName>ParseISLogStats</ProcessName>
                <startTimeHeader>StartTime</startTimeHeader>
                    <Conditions>
                        <Condition
                            name='BuildProject' value="KInstallerBuild">
                        </Condition>
                        <Condition
                            name='BaseBuildArea' value="D:R_BuildsKv2.1nightly">
                        </Condition>
                    </Conditions>
                    <SuccessCriteria>
                            <field>Status</field>
                            <comparison>equal</comparison> 
                            <value>Success</value>
                    </SuccessCriteria>
            </Process>

        </build>
    </BuildVerification>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật