This is what Nick Malik suggested from the c# newsgroup. Now that the hectic
workweek is over, I can begin to appreciate what he said and break it down
into constituent elements to solve. If anyone has any implementation
examples related to what Nick describes below, they would be
ppreciated. -hazz
One thing you could do is to place your rules in a database. Each rule
consists of an XPath expression for the operand, and operator, the value you
compare against, and the score. Bring your data into your system and
serialize it into an XML document. Then, apply each of the Xpath queries to
the object, one at a time. If the query produces a result, you have a value
you can compare against. Apply the comparison and, if true, add the score
to your accumulated score.
This will work regardless of the data coming in, and your storage mechanism
can work for anything. Xpath queries are very powerful and you can
differentiate easily depending on the structure of the inbound document, so
that a query may match a value only if it is at a particular place in the
document, or anywhere in the document... up to you.
Total lines of code < 200. Highly flexible since you can add and delete
rules in the db at any time.