I’m testing data binding and calling web services in WPF. I’m using a web service which returns the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<string xmlns="http://www.webserviceX.NET">
<NewDataSet>
<Table>
<AtomicWeight>4.0026</AtomicWeight>
</Table>
</NewDataSet>
</string>
And I’m trying to take the Atomic Weight and assign that string to a property called LookupOutput.
I’ve followed XPath tutorials and LINQ tutorials but haven’t been able to find one which is simplified enough for this example. What is the cleanest way to get to single elements from XML in a string?
1 Answer