I have more xml file. I need to get the MC machine lines values. What is the simples way to get these values in vb.net? These vaues are all times in "Attr num="123"" block.
<?xml version="1.0" encoding="UTF-8"?>
<RadanCompoundDocument xmlns="http://www.radan.com/ns/rcd">
<RadanAttributes>
<Group class="system" name="System" desc="These attributes describe the RADAN system used to create this file."
ord="8">
<Attr num="13" name="Language" desc="RADAN language code." type="i" ord="1" value="19">
<Valid perm="r"/>
</Attr>
</Attr>
<Attr num="15" name="Build" desc="RADAN software build." type="s" ord="3" value="2022.1.2228">
<Valid perm="r"/>
</Attr>
</Group>
<Group class="custom" name="Manufacturing" desc="These attributes are the manufacturing properties of the file."
ord="6">
<Attr num="119" name="Material" desc="Material." type="s" ord="1" value="Mild Steel">
<Valid perm="e" max="100"/>
</Attr>
<Attr num="120" name="Thickness" desc="Thickness." type="r" ord="2" value="1">
<Valid perm="e" min="0" max="99999"/>
</Attr>
<Attr num="121" name="Thickness units" desc="Thickness units." type="s" ord="4" value="mm">
<Valid perm="e" expr="mm|in|swg" max="80"/>
</Attr>
<Attr num="123" name="Cycle time" desc="Cycle time in minutes." type="r" ord="26" value="0">
<Valid perm="e" min="0"/>
<MC machine="psys_CAA001_1" value="10"/>
<MC machine="psys_CAA001_2" value="20"/>
<MC machine="psys_CAA001_3" value="30"/>
<MC machine="psys_CAA001_4" value="40"/>
</Attr>
<Attr num="124" name="Sheet X" desc="Sheet length in the X direction." type="r" ord="12" value="2500">
<Valid perm="e" min="0"/>
</Attr>
<Attr num="125" name="Sheet Y" desc="Sheet length in the Y direction." type="r" ord="13" value="1250">
<Valid perm="e" min="0"/>
</Attr>
</Group>
</Group>
</RadanAttributes>
</RadanCompoundDocument>
Thanks! Tibi
I not work similar xml before.
Use XmlDocument.SelectNodes with a fitting XPath expression to retrieve a list of matching nodes XmlNodeList
Something like