I have this WCF service providing search functionality - to be used by our client in his web application. There can be any number of search parameters and possible nesting of AND/OR operations.Could you please have a look and share some ideas on if I can make it more client-friendly?  <con:Search>     <con:clientID>xxx</con:clientID>     <con:propertyQueries>        <wil:PropertyQuery Id=0>            <wil:PropertyID>DocumentType</wil:PropertyID>                  <wil:Value>Statement</wil:Value>            <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>                <wil:PropertyQuery Id=1 AND=0>            <wil:PropertyID>BANK</wil:PropertyID>                  <wil:Value>HSBC</wil:Value>                         <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>                <wil:PropertyQuery Id=2 OR=1>            <wil:PropertyID>BANK</wil:PropertyID>                  <wil:Value>BARCLAYS</wil:Value>            <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>            <wil:PropertyQuery Id=3 AND=0>            <wil:PropertyID>Date</wil:PropertyID>                  <wil:Value Start=1>11/01/2014</wil:Value>            <wil:Value End=1>11/02/2014</wil:Value>            <wil:Operator>BETWEEN</wil:Operator>            </wil:PropertyQuery>                </con:propertyQueries>  </con:Search>   The values in AND and OR attribute indicates the Id of PropertyQuery to which the condition to be added. For example:  <wil:PropertyQuery Id=2 OR=1>performs an OR operation between Property Queries with ID of 1, 2.Any better ideas out there to improve the interface?
Exposing WCF Service with dynamic search operation
c#;.net;sql;wcf
The way you're composing expressions seems very unintuitive to me. I think that you should take advantage of the fact that you're trying to express (part of) the SQL syntax tree in the XML tree. So, AND should be a separate node and it should have its child expressions as child nodes. Something like (if I misunderstood how your AND/ORs work, that only proves my point):<wil:combinedQuery operator=AND>    <wil:combinedQuery operator=AND>        <wil:PropertyQuery Id=0>            <wil:PropertyID>DocumentType</wil:PropertyID>                  <wil:Value>Statement</wil:Value>            <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>        <wil:PropertyQuery Id=3>            <wil:PropertyID>Date</wil:PropertyID>                  <wil:Value Start=1>11/01/2014</wil:Value>            <wil:Value End=1>11/02/2014</wil:Value>            <wil:Operator>BETWEEN</wil:Operator>            </wil:PropertyQuery>     </wil:combinedQuery>    <wil:combinedQuery operator=OR>        <wil:PropertyQuery Id=1 AND=0>            <wil:PropertyID>BANK</wil:PropertyID>                  <wil:Value>HSBC</wil:Value>                         <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>                <wil:PropertyQuery Id=2 OR=1>            <wil:PropertyID>BANK</wil:PropertyID>                  <wil:Value>BARCLAYS</wil:Value>            <wil:Operator>EQUALS</wil:Operator>         </wil:PropertyQuery>       </wil:combinedQuery></wil:combinedQuery>Dates should be in the unambiguous ISO 8601 format, not in the ambiguous and confusing (mm/dd/yyyy, or is it dd/mm/yyyy?) format.I don't like much the way you're representing BETWEEN. I think that Start and End should be in elements (or attributes) with those names.