At the simple level, fuzzy match of attribute values and text contents
should work pretty well. Any missing attribute or elements can be treated
as wildcards.
At the complex level, scripting language for matching should work pretty
well.
Here is an example:
<order department="electronics" salesperson="bob">
<descr>CD-ROM</descr>
<quantity>
<xbe:script>
quantity > 10
</xbe:script>
</quantity>
<comment/>
</order>
Above XBE should return all order records for sales made at the electronics
department by Bob where product description 'contains' the string "CD-ROM"
and quantity exceeds 10. The scripting language refers to context elements
and attributes by name (order.department for attribute).
There are obvious rough spots but I think it has promises. Whether or not I
will invest time and effort into XBE is another question of course.
Don