As part of a project I need to parse some values from some XML which doesn't seem to be standard XML. The XML is stored in SQL Server. I need to query the database and retrieve this XML, then in C# I need to get the value of the XCoord and YCoord fields. Can someone show me how this could be achieved using System.Xml?
If anyone knows a SQL Query to return these values from the XML data, that would do just as well.
<AdapterItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.enceladus.com/Data">
<Attributes>
<Attribute>
<Name>Process ID</Name>
<Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">1000</Value>
</Attribute>
<Attribute>
<Name>Request</Name>
<Value i:type="AdapterItem">
<Attributes>
<Attribute>
<Name>Location</Name>
<Value i:type="AdapterItem">
<Attributes>
<Attribute>
<Name>XCoord</Name>
<Value xmlns:d10p1="http://www.w3.org/2001/XMLSchema" i:type="d10p1:string">482557.53208923</Value>
</Attribute>
<Attribute>
<Name>YCoord</Name>
<Value xmlns:d10p1="http://www.w3.org/2001/XMLSchema" i:type="d10p1:string">240588.72462463</Value>
</Attribute>
</Attributes>
</Value>
</Attribute>
<Attribute>
<Name>Description</Name>
<Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Some Description</Value>
</Attribute>
</Attributes>
</Value>
</Attribute>
</Attributes>
</AdapterItem>
Thanks in advance!