<module name="容器" info="容器" type="Container" id="175" fId="-1">
<properties>
<property name="W" value="350px" />
<property name="H" value="300px" />
<property name="X" value="0px" />
<property name="Y" value="0px" />
<property name="Z" value="1" />
</properties>
<extendedProperties>
<extendedProperty name="Float" value="left" />
<extendedProperty name="BorderWidth" value="1px" />
</extendedProperties>
</module>
<module name="仪表盘" info="仪表盘" type="Gauge" id="176" fId="175">
<properties>
<property name="W" value="120" />
<property name="H" value="120" />
<property name="X" value="0" />
<property name="Y" value="0" />
<property name="Z" value="1" />
</properties>
<extendedProperties>
<extendedProperty name="DevicePropertyID" value="0" />
<extendedProperty name="Min" value="0" />
<extendedProperty name="Max" value="100" />
</extendedProperties>
</module>
例如:想获取id=176的module节点下所有子节点
用XPath:
var root=XElement.Load("这里是你的xml");