In my program I get passed some XML. If values in this XML fulfil a user defined criteria I store the xml otherwise it gets discarded. The problem I have is that I need to be able to allow the user to define the criteria (also combining multiple element with “OR” and “AND”) and then applying this when I get the XML. This is a C# application, can anyone recommend a library, tool or help in which way I should go about resolving this problem? Shown below is the XML that I will receive. The user may only want to store this if <unit> =1
AND (the first part of <data> = Z
OR <data>
has ABC after the second coma).
<interface>
<mac>12345</mac>
<device>DeviceTypeA</device>
<id>TestUnit</id>
<data>
<unit>1</unit>
<transaction>
<event>0</event>
<data>Z,0,ABC,1234</data>
<time>2010-06-29T11:33:44.0000000Z</time>
</transaction >
</data>
</interface>