I have a XML file with a structure like this:
How can I grab the LineExtensionAmount? I have tried the following (cannot share the entire workflow because it contains lots of sensitive stuff):
For each with: For each Item in xmlDoc.Descendants(cac+“LegalMonetaryTotal”)
with in the previous for each: For each iline in item.Descendants(cac+“LegalMonetaryTotal”)
Then within that loop: iline.Descendants(cbc+“TaxExclusiveAmount”).Value.Replace(“.00”,“”).ToString
This however, just returns blank values. It works when it’s another field three levels deep, like this:
If I change the first for each to TaxTotal, the second to TaxSubtotal and the assign (third) to TaxableAmount, it works. The same code doesn’t work with two levels. Any ideas?