Problem with XML elements

@Majlopajlo
we cannot see the deatils of your xml. Maybe you can share the sample xml file, a screenshot or using the editor format option </>

One important question is, if the XML is defining namespaces.

lets assume the xml looks like this in the structure:
xDoc:

  • root
    • leg
      • e1
      • e2
    • leg
      • e1
      • e2

retrieve all legs with xDoc.Root.Descendants(“leg”).toList - retuned: List(Of XElement) xeLegs

iterate over xeLegs within a for each and setup the element retrieval ( in this demo: e1,e2)

also have a look here:

1 Like