couple possible ways I could see doing this.
- Use long xpaths:
select=“/document/Invoice/Customer”
Selects all customers
select=“/document/Invoice/Customer[customer_id = /document/Invoice/Partner/Hierarchy/Relationships/Element/customer_id]”
Selects all customers who have a relationship associated with them.
select=“/document/Invoice/Customer[customer_id = /document/Invoice/Partner/Hierarchy/Relationships/Element[parent_element_id = $pei]/customer_id]/”
Selects all customers who have are in district $pei.
select=“count/document/Invoice/Customer[customer_id = /document/Invoice/Partner/Hierarchy/Relationships/Element[parent_element_id = $pei]/customer_id]/Trans)”
count of all Transaction of those customers.
select=“count(/document/Invoice/Customer[customer_id = /document/Invoice/Partner/Hierarchy/Relationships/Element[parent_element_id = $pei]/customer_id]/Trans[trans_type=‘CHRG’])”
Count all CHRG transactions for those customers.
- Create a temporary piece of xml incorporating your structure, which uses the xml structure properly. I created a small xsl file to do such a transformation. Then, finding/summing/calculating with this data is much easier. attached example
temp.xml (4.75 KB)
#Tamino#webMethods#API-Management