I have an xml file like this:

```
<?xml version="1.0" standalone="yes"?>
<!--This is a V6 File.-->
<ROOT>
  <EVENT>
    <APPOINT.APPNO>123456</APPOINT.APPNO>
    <APPOINT.DATE>01/01/2021</APPOINT.DATE>
    <PERSON_INFO>
      <PERSON.CUSTNO>12131415</PERSON.CUSTNO>
      <PERSON.LAST>WAYNE</PERSON.LAST>
      <PERSON.FIRST>BRUCE</PERSON.FIRST>
      <PERSON.MI />
      <PERSON.STREET>1234 RANDOM ST</PERSON.STREET>
      <PERSON.APT />
      <PERSON.CITY>GOTHAM</PERSON.CITY>
    </PERSON_INFO>
    <ACCOUNT_INFO>
      <CARRIER_ACCOUNT_SUMMARY>
        <ITEM.GROUP>PERSON GROUP</ITEM.GROUP>
        <ITEM.SUM_CHRG>100.50</ITEM.SUM_CHRG>
        <ITEM.SUM_PAID>0</ITEM.SUM_PAID>
        <ITEM.SUM_WOFF>0</ITEM.SUM_WOFF>
        <ITEM.SUM_XOVR>0</ITEM.SUM_XOVR>
        <ITEM.SUM_DEDUCTIBLE>0</ITEM.SUM_DEDUCTIBLE>
        <ITEM.SUM_DUE>100.50</ITEM.SUM_DUE>
      </CARRIER_ACCOUNT_SUMMARY>
      <CARRIER_ACCOUNT_SUMMARY>
        <ITEM.GROUP>PERSON GROUP #2</ITEM.GROUP>
        <ITEM.SUM_CHRG>225.50</ITEM.SUM_CHRG>
        <ITEM.SUM_PAID>110.50</ITEM.SUM_PAID>
        <ITEM.SUM_WOFF>0</ITEM.SUM_WOFF>
        <ITEM.SUM_XOVR>115.00</ITEM.SUM_XOVR>
        <ITEM.SUM_DEDUCTIBLE>0</ITEM.SUM_DEDUCTIBLE>
        <ITEM.SUM_DUE>0.00</ITEM.SUM_DUE>
      </CARRIER_ACCOUNT_SUMMARY>
      <ITEM>
        <ITEM.TRCNO>654321</ITEM.TRCNO>
        <ITEM.INVOICE>987654</ITEM.INVOICE>
      </ITEM>
    </ACCOUNT_INFO>
    <DETAIL_INFO>
      <DETAIL>
        <TOADD.TOANO>123456</TOADD.TOANO>
        <TOADD.EPCRNUM>00-00-000000</TOADD.EPCRNUM>
      </DETAIL>
    </DETAIL_INFO>
  </EVENT>
</ROOT>

```

I'm getting the nodes I need using this:

```
Dim xnlNodes As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("/ROOT/EVENT")

```

I'm trying to get the `<ITEM.SUM_CHRG>` into an array, so for `person.custno`'12131415' there would be a value of "100.50", and a value of "225.50" in the array, and I want to use a max method to determine which is the largest value in the array.

I am struggling with just creating the array because I honestly just struggle with arrays in vb.net. I've tried doing a loop, checking the child node names for "ITEM.SUM\_CHRG" And putting the value into a variable called strSumChrg so I can check if it's larger that way but I think I'm way off.

I am doing the above inside a for each loop like below

```
xmlDoc.Load(strFileName)
Dim xnlNodes As XmlNodeList = xmlDoc.DocumentElement.SelectNodes("/ROOT/EVENT")
  For Each xnNode As XmlNode In xnlNodes

        Dim strSumChrg As Decimal = 0
        If xnSC.Name = "ITEM.SUM_CHRG" Then
            If xnSC.FirstChild.Value > 0 Then
                strSumChrg = Math.Max(CDec(xnSC.FirstChild.Value), strSumChrg)
            End If
        End If

Next

```