I have xml similar to below:
<Beans>
<Bean>
<Type>D</Type> <!--type can be D, B, C-->
<Name>Dental</Name>
<Transaction>121</Transaction>
<Amount></Amount>
</Bean>
<Bean>
<Type>D</Type> <!--type can be D, B, C-->
<Name>Dental</Name>
<Transaction>12312</Transaction>
<Amount>123.45</Amount>
</Bean>
</Beans>
Business rules for this xml: For each bean, if type is D 1:Name shouldn't be null 2:Amount and transaction shouldn't be null 3: Amount and transaction should match existing values for the same transaction in database table. 4: If type is other than D, then there are different rules.
How do i represent this in Drools rule language.