For simple XML, ignore XmlDocument and string parse?



I've started working with a new database that encodes certain values as XML strings. Invariably all I need is the value of an attribute in one of the elements, but it's a different attribute for different columns in the db. Here's an example of one of them...



<X C="1" I="0">
<E D="1000Y0M0W0D" P="1" A="5700" />
</X>


And in this case, all I need is the value of the A.


Is this something I can do easily using System.XML, or should I just use RegEx or Split on the string?


No comments:

Post a Comment