Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何在Groovy代码SoapUI中编写Xpath查询?_Xml_Xpath_Groovy_Soapui - Fatal编程技术网

Xml 如何在Groovy代码SoapUI中编写Xpath查询?

Xml 如何在Groovy代码SoapUI中编写Xpath查询?,xml,xpath,groovy,soapui,Xml,Xpath,Groovy,Soapui,我是groovy脚本编写新手,正在尝试编写一段代码,该代码应使用以下Xpath提供输出: /BillingInvoice/invoicedOrders/entry/value/lines/aggregationKey[text()='INV_GROUP_Meterreading' or text()='INV_GROUP_Power']/../(aggregationKey|amount) 这个Xpath在在线Xpath格式检查中运行良好,但我无法在Groovy脚本中运行,因为我对它了解不多

我是groovy脚本编写新手,正在尝试编写一段代码,该代码应使用以下Xpath提供输出:

/BillingInvoice/invoicedOrders/entry/value/lines/aggregationKey[text()='INV_GROUP_Meterreading' or text()='INV_GROUP_Power']/../(aggregationKey|amount)
这个Xpath在在线Xpath格式检查中运行良好,但我无法在Groovy脚本中运行,因为我对它了解不多

在这里编写Groovy脚本的目的是提取与聚合键对应的所有数量并进行求和,但目前我甚至无法获取标记元素和值

下面是我正在使用的XML,它保存在SOAPUI属性中。我正在用Groovy脚本解析它:

<BillingInvoice>
   <aggregation>
      <aggregations>
         <aggregations>
            <key>INV_GROUP_Power</key>
            <showUnitPrice>true</showUnitPrice>
            <showVolume>true</showVolume>
            <volumeUoM>kW</volumeUoM>
         </aggregations>
         <aggregations>
            <key>INV_GROUP_Meterreading</key>
            <showUnitPrice>true</showUnitPrice>
            <showVolume>true</showVolume>
            <volumeUoM>days</volumeUoM>
         </aggregations>
         <key>DISTRIBUTION</key>
         <showUnitPrice>false</showUnitPrice>
         <showVolume>false</showVolume>
      </aggregations>
   </aggregation>
   <amount>153.6600000000</amount>
   <balance>153.6600000000</balance>
   <bundleId>000000~DEFAULT</bundleId>
   <consumptionEvolution>
      <consumption>
         <deliveryPointId>555555555555555</deliveryPointId>
         <endPeriod>2017-07-31T00:00:00+02:00</endPeriod>
         <startPeriod>2016-08-01T00:00:00+02:00</startPeriod>
         <timeFrame>TOTAL_HOUR</timeFrame>
         <value>74645.2300000000</value>
         <meteringContext>PERIODIC_METERING</meteringContext>
      </consumption>
      <consumption>
         <deliveryPointId>555555555555555</deliveryPointId>
         <endPeriod>2015-05-07T00:00:00+02:00</endPeriod>
         <startPeriod>2015-03-19T00:00:00+01:00</startPeriod>
         <timeFrame>TOTAL_HOUR</timeFrame>
         <value>471.8600000000</value>
         <meteringContext>GAIN</meteringContext>
      </consumption>
      <consumption>
         <deliveryPointId>555555555555555</deliveryPointId>
         <endPeriod>2015-03-19T00:00:00+01:00</endPeriod>
         <startPeriod>2014-11-01T00:00:00+01:00</startPeriod>
         <timeFrame>TOTAL_HOUR</timeFrame>
         <value>3860.2600000000</value>
         <meteringContext>GAIN</meteringContext>
      </consumption>
   </consumptionEvolution>
   <customer>
      <accountNr>999999999</accountNr>
      <billingId>444444444</billingId>
   </customer>
   <dueDate>2017-08-21T00:00:00+02:00</dueDate>
   <dunningBlockedByAgent>false</dunningBlockedByAgent>
   <dunningBlockedBySystem>false</dunningBlockedBySystem>
   <dunningStatus>NID</dunningStatus>
   <eanTotalEvolution>
      <totalEvolution>
         <connectionKey>555555555555555</connectionKey>
         <eanTotalConsumption/>
      </totalEvolution>
   </eanTotalEvolution>
   <invoiceDate>2017-08-07T00:00:00+02:00</invoiceDate>
   <invoiceNumber>GHJKJ111111</invoiceNumber>
   <invoiceType>SETTLEMENT</invoiceType>
   <invoicedOrders>
      <entry>
         <key>59412</key>
         <value>
            <address>
               <city>Stackoverflow</city>
               <country>US</country>
               <deliveryPointID>555555555555555</deliveryPointID>
               <gridcompany>4444444444444</gridcompany>
               <region>Cold</region>
               <streetName>Placeforeveryone</streetName>
               <streetNumber>420</streetNumber>
               <zipcode>xxxxxx</zipcode>
            </address>
            <billingEstimates>
               <billingEstimate>
                  <fromDate>2015-11-01T00:00:00+01:00</fromDate>
                  <logDate>2017-08-07T00:00:00+02:00</logDate>
                  <meteringContext>GAIN</meteringContext>
                  <source>MARKET</source>
                  <timeframe>TOTAL_HOUR</timeframe>
                  <validFrom>2015-11-01T00:00:00+01:00</validFrom>
                  <validTo>2015-11-01T00:00:00+01:00</validTo>
                  <value>46802.0000000000</value>
               </billingEstimate>
               <billingEstimate>
                  <fromDate>2015-11-01T00:00:00+01:00</fromDate>
                  <logDate>2017-08-07T00:00:00+02:00</logDate>
                  <meteringContext>GAIN</meteringContext>
                  <source>MARKET</source>
                  <timeframe>TOTAL_HOUR</timeframe>
                  <validFrom>2015-11-01T00:00:00+01:00</validFrom>
                  <validTo>9999-12-31T00:00:00+01:00</validTo>
                  <value>12409.0000000000</value>
               </billingEstimate>
            </billingEstimates>
            <contractLine>00000-0000-0000-57af-00000</contractLine>
            <contractNumber>00000-00000-00000-8cbe-00000</contractNumber>
            <contractedVolumes>
               <fromDate>2015-11-01T00:00:00+01:00</fromDate>
               <timeFrame>TOTAL_HOUR</timeFrame>
               <toDate>9999-12-31T00:00:00+01:00</toDate>
               <value>200000.0000000000</value>
            </contractedVolumes>
            <historicalConsumptions>
               <deliveryPointId>555555555555555</deliveryPointId>
               <endPeriod>2014-11-01T00:00:00+01:00</endPeriod>
               <startPeriod>2014-04-11T00:00:00+02:00</startPeriod>
               <timeFrame>TOTAL_HOUR</timeFrame>
               <value>1057.6900000000</value>
            </historicalConsumptions>
            <historicalConsumptions>
               <deliveryPointId>555555555555555</deliveryPointId>
               <endPeriod>2015-03-19T00:00:00+01:00</endPeriod>
               <startPeriod>2014-11-01T00:00:00+01:00</startPeriod>
               <timeFrame>TOTAL_HOUR</timeFrame>
               <value>3860.2600000000</value>
            </historicalConsumptions>
            <historicalConsumptions>
               <deliveryPointId>555555555555555</deliveryPointId>
               <endPeriod>2015-05-07T00:00:00+02:00</endPeriod>
               <startPeriod>2015-03-19T00:00:00+01:00</startPeriod>
               <timeFrame>TOTAL_HOUR</timeFrame>
               <value>471.8600000000</value>
            </historicalConsumptions>
            <lines>
               <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
               <amount>8.2400000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 21% 2017-01-01/2017-07-31</description>
               <invoiceLineId>200196</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
               <periodStart>2017-01-01T00:00:00+01:00</periodStart>
               <price>21.0000000000</price>
               <productCode>VAT_21%</productCode>
               <quantity>39.2500000000</quantity>
               <vatBaseAmount>39.2500000000</vatBaseAmount>
               <vatCode>VAT-OUT-21-S</vatCode>
               <vatPerc>21.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
               <amount>0.0000000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 0%  2017-01-01/2017-07-31</description>
               <invoiceLineId>200195</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
               <periodStart>2017-01-01T00:00:00+01:00</periodStart>
               <price>0.0000000000</price>
               <productCode>VAT_0%</productCode>
               <quantity>0.0000000000</quantity>
               <vatBaseAmount>0.0000000000</vatBaseAmount>
               <vatCode>VAT-OUT-00-S</vatCode>
               <vatPerc>0.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
               <amount>2.8000000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas meterreading 2017-01-01/2017-07-31</description>
               <invoiceLineId>200194</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
               <periodStart>2017-01-01T00:00:00+01:00</periodStart>
               <price>0.0132876700</price>
               <productCode>D_Gas_meterreading</productCode>
               <quantity>211.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Power</aggregationKey>
               <amount>36.4500000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas fixed term 2017-01-01/2017-07-31</description>
               <invoiceLineId>200193</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
               <periodStart>2017-01-01T00:00:00+01:00</periodStart>
               <price>0.1727671200</price>
               <productCode>D_Gas_fixed_term</productCode>
               <quantity>211.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
               <amount>0.0000000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 0%  2016-03-01/2017-01-01</description>
               <invoiceLineId>200192</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-03-01T00:00:00+01:00</periodStart>
               <price>0.0000000000</price>
               <productCode>VAT_0%</productCode>
               <quantity>0.0000000000</quantity>
               <vatBaseAmount>0.0000000000</vatBaseAmount>
               <vatCode>VAT-OUT-00-S</vatCode>
               <vatPerc>0.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
               <amount>13.0300000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 21% 2016-03-01/2017-01-01</description>
               <invoiceLineId>200191</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-03-01T00:00:00+01:00</periodStart>
               <price>21.0000000000</price>
               <productCode>VAT_21%</productCode>
               <quantity>62.0500000000</quantity>
               <vatBaseAmount>62.0500000000</vatBaseAmount>
               <vatCode>VAT-OUT-21-S</vatCode>
               <vatPerc>21.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
               <amount>6.7900000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas meterreading 2016-03-01/2017-01-01</description>
               <invoiceLineId>200190</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-03-01T00:00:00+01:00</periodStart>
               <price>0.0221857900</price>
               <productCode>D_Gas_meterreading</productCode>
               <quantity>306.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Power</aggregationKey>
               <amount>55.2600000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas fixed term 2016-03-01/2017-01-01</description>
               <invoiceLineId>200189</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-03-01T00:00:00+01:00</periodStart>
               <price>0.1805737700</price>
               <productCode>D_Gas_fixed_term</productCode>
               <quantity>306.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
               <amount>1.2300000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 21% 2016-02-01/2016-03-01</description>
               <invoiceLineId>200188</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-02-01T00:00:00+01:00</periodStart>
               <price>21.0000000000</price>
               <productCode>VAT_21%</productCode>
               <quantity>5.8800000000</quantity>
               <vatBaseAmount>5.8800000000</vatBaseAmount>
               <vatCode>VAT-OUT-21-S</vatCode>
               <vatPerc>21.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
               <amount>0.0000000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 0%  2016-02-01/2016-03-01</description>
               <invoiceLineId>200187</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-02-01T00:00:00+01:00</periodStart>
               <price>0.0000000000</price>
               <productCode>VAT_0%</productCode>
               <quantity>0.0000000000</quantity>
               <vatBaseAmount>0.0000000000</vatBaseAmount>
               <vatCode>VAT-OUT-00-S</vatCode>
               <vatPerc>0.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
               <amount>0.6400000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas meterreading 2016-02-01/2016-03-01</description>
               <invoiceLineId>200186</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-02-01T00:00:00+01:00</periodStart>
               <price>0.0221857900</price>
               <productCode>D_Gas_meterreading</productCode>
               <quantity>29.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Power</aggregationKey>
               <amount>5.2400000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas fixed term 2016-02-01/2016-03-01</description>
               <invoiceLineId>200185</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-02-01T00:00:00+01:00</periodStart>
               <price>0.1805737700</price>
               <productCode>D_Gas_fixed_term</productCode>
               <quantity>29.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
               <amount>1.3200000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 21% 2016-01-01/2016-02-01</description>
               <invoiceLineId>200184</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-01-01T00:00:00+01:00</periodStart>
               <price>21.0000000000</price>
               <productCode>VAT_21%</productCode>
               <quantity>6.2900000000</quantity>
               <vatBaseAmount>6.2900000000</vatBaseAmount>
               <vatCode>VAT-OUT-21-S</vatCode>
               <vatPerc>21.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
               <amount>0.0000000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 0%  2016-01-01/2016-02-01</description>
               <invoiceLineId>200183</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-01-01T00:00:00+01:00</periodStart>
               <price>0.0000000000</price>
               <productCode>VAT_0%</productCode>
               <quantity>0.0000000000</quantity>
               <vatBaseAmount>0.0000000000</vatBaseAmount>
               <vatCode>VAT-OUT-00-S</vatCode>
               <vatPerc>0.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
               <amount>0.6900000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas meterreading 2016-01-01/2016-02-01</description>
               <invoiceLineId>200182</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-01-01T00:00:00+01:00</periodStart>
               <price>0.0221857900</price>
               <productCode>D_Gas_meterreading</productCode>
               <quantity>31.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Power</aggregationKey>
               <amount>5.6000000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas fixed term 2016-01-01/2016-02-01</description>
               <invoiceLineId>200181</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
               <periodStart>2016-01-01T00:00:00+01:00</periodStart>
               <price>0.1805737700</price>
               <productCode>D_Gas_fixed_term</productCode>
               <quantity>31.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
               <amount>0.0000000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 0%  2015-11-01/2016-01-01</description>
               <invoiceLineId>200180</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2015-11-01T00:00:00+01:00</periodStart>
               <price>0.0000000000</price>
               <productCode>VAT_0%</productCode>
               <quantity>0.0000000000</quantity>
               <vatBaseAmount>0.0000000000</vatBaseAmount>
               <vatCode>VAT-OUT-00-S</vatCode>
               <vatPerc>0.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
               <amount>2.8400000000</amount>
               <billingType>settlement</billingType>
               <description>VAT 21% 2015-11-01/2016-01-01</description>
               <invoiceLineId>200179</invoiceLineId>
               <isPercentage>1</isPercentage>
               <isVatPercentage>true</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2015-11-01T00:00:00+01:00</periodStart>
               <price>21.0000000000</price>
               <productCode>VAT_21%</productCode>
               <quantity>13.5300000000</quantity>
               <vatBaseAmount>13.5300000000</vatBaseAmount>
               <vatCode>VAT-OUT-21-S</vatCode>
               <vatPerc>21.0000000000</vatPerc>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
               <amount>1.6600000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas meterreading 2015-11-01/2016-01-01</description>
               <invoiceLineId>200178</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2015-11-01T00:00:00+01:00</periodStart>
               <price>0.0272602700</price>
               <productCode>D_Gas_meterreading</productCode>
               <quantity>61.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <lines>
               <aggregationKey>INV_GROUP_Power</aggregationKey>
               <amount>11.8700000000</amount>
               <billingType>settlement</billingType>
               <description>D Gas fixed term 2015-11-01/2016-01-01</description>
               <invoiceLineId>200177</invoiceLineId>
               <isPercentage>0</isPercentage>
               <isVatPercentage>false</isVatPercentage>
               <orderLineType>SETTLEMENT</orderLineType>
               <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
               <periodStart>2015-11-01T00:00:00+01:00</periodStart>
               <price>0.1946575300</price>
               <productCode>D_Gas_fixed_term</productCode>
               <quantity>61.0000000000</quantity>
               <vatCode>VAT-OUT-21-S</vatCode>
            </lines>
            <meterType>YEAR</meterType>
            <newAdvanced>
               <recurringAmount>42.0000000000</recurringAmount>
               <recurringUnit>MONTH</recurringUnit>
               <recurringValue>1</recurringValue>
            </newAdvanced>
            <orderType>SETTLEMENT</orderType>
            <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
            <periodStart>2015-11-01T00:00:00+01:00</periodStart>
            <productType>NG</productType>
            <subAmount>153.6600000000</subAmount>
         </value>
      </entry>
   </invoicedOrders>
   <paymentReference>+++000/000000/00000000+++</paymentReference>
   <relationRef>88888888</relationRef>
   <status>2</status>
   <unsettledInvoices/>
   <withAttachment>false</withAttachment>
   <yearlyConsumptionEvolution>
      <yearlyConsumptionPerEan>
         <connectionKey>555555555555555</connectionKey>
         <yearlyConsumptions>
            <yearlyConsumption>
               <timeFrameConsumptions>
                  <timeFrameConsumption>
                     <consumption>44639.0266771523</consumption>
                     <timeFrame>TOTAL_HOUR</timeFrame>
                  </timeFrameConsumption>
               </timeFrameConsumptions>
               <year>2017</year>
            </yearlyConsumption>
            <yearlyConsumption>
               <timeFrameConsumptions>
                  <timeFrameConsumption>
                     <consumption>5257.2047645253</consumption>
                     <timeFrame>TOTAL_HOUR</timeFrame>
                  </timeFrameConsumption>
               </timeFrameConsumptions>
               <year>2015</year>
            </yearlyConsumption>
            <yearlyConsumption>
               <timeFrameConsumptions>
                  <timeFrameConsumption>
                     <consumption>4971.3241391945</consumption>
                     <timeFrame>TOTAL_HOUR</timeFrame>
                  </timeFrameConsumption>
               </timeFrameConsumptions>
               <year>2014</year>
            </yearlyConsumption>
         </yearlyConsumptions>
      </yearlyConsumptionPerEan>
   </yearlyConsumptionEvolution>
</BillingInvoice>

投资集团动力
真的
真的
千瓦
库存组计量表读数
真的
真的
天
分布
假的
假的
153.6600000000
153.6600000000
000000~默认值
555555555555555
2017-07-31T00:00:00+02:00
2016-08-01T00:00:00+02:00
总小时
74645.2300000000
定期计量
555555555555555
2015-05-07T00:00:00+02:00
2015-03-19T00:00:00+01:00
总小时
471.8600000000
获得
555555555555555
2015-03-19T00:00:00+01:00
2014-11-01T00:00:00+01:00
总小时
3860.2600000000
获得
999999999
444444444
2017-08-21T00:00:00+02:00
假的
假的
奈德
555555555555555
2017-08-07T00:00:00+02:00
GHJKJ111111
结算
59412
栈溢出
美国
555555555555555
4444444444444
冷的
每个人的位置
420
xxxxxx
2015-11-01T00:00:00+01:00
2017-08-07T00:00:00+02:00
获得
市场
总小时
2015-11-01T00:00:00+01:00
2015-11-01T00:00:00+01:00
46802
2015-11-01T00:00:00+01:00
2017-08-07T00:00:00+02:00
获得
市场
总小时
2015-11-01T00:00:00+01:00
9999-12-31T00:00:00+01:00
12409
00000-0000-0000-57af-00000
00000-00000-00000-8cbe-00000
2015-11-01T00:00:00+01:00
总小时
9999-12-31T00:00:00+01:00
200000
555555555555555
2014-11-01T00:00:00+01:00
2014-04-11T00:00:00+02:00
总小时
1057.6900000000
555555555555555
2015-03-19T00:00:00+01:00
2014-11-01T00:00:00+01:00
总小时
3860.2600000000
555555555555555
2015-05-07T00:00:00+02:00
2015-03-19T00:00:00+01:00
总小时
471.8600000000
投资集团增值税21%
8.2400000000
解决
增值税21%2017-01-01/2017-07-31
200196
1.
真的
结算
2017-07-31T00:00:00+02:00
2017-01-01T00:00:00+01:00
21
增值税21%
39.2500000000
39.2500000000
VAT-OUT-21-S
21
投资集团增值税0%
0
解决
增值税0%2017-01-01/2017-07-31
200195
1.
真的
结算
2017-07-31T00:00:00+02:00
2017-01-01T00:00:00+01:00
0
增值税0%
0
0
VAT-OUT-00-S
0
库存组计量表读数
2.8000000000
解决
D燃气表读数2017-01-01/2017-07-31
200194
0
假的
结算
2017-07-31T00:00:00+02:00
2017-01-01T00:00:00+01:00
0.0132876700
D_燃气表读数
211
VAT-OUT-21-S
投资集团动力
36.4500000000
解决
D天然气固定期限2017-01-01/2017-07-31
200193
0
假的
结算
2017-07-31T00:00:00+02:00
2017-01-01T00:00:00+01:00
0.1727671200
D_气体固定期限
211
VAT-OUT-21-S
投资集团增值税0%
0
解决
增值税0%2016-03-01/2017-01-01
200192
1.
真的
结算
2017-01-01T00:00:00+01:00
2016-03-01T00:00:00+01:00
0
增值税0%
0
0
VAT-OUT-00-S
0
投资集团增值税21%
13.0300000000
解决
增值税21%2016-03-01/2017-01-01
200191
//Define what key & possible values to filter
def filterMap = [aggregationKey:['INV_GROUP_Meterreading','INV_GROUP_Power']]

//Pass xmlString below, not added for saving space
def xml = new XmlSlurper().parseText(xmlString)

def result = filterMap.collect{ k,v -> xml.'**'.findAll{it.name() == k && it in v}*.parent()*.amount*.text()}.flatten().sum{it as Double}
log.info result
import com.eviware.soapui.support.XmlHolder
//Pass xmlString, avoiding to save the space
def holder = new XmlHolder(xmlString)
def result = holder.getNodeValue("sum(//*:lines[aggregationKey[.='INV_GROUP_Meterreading' or .='INV_GROUP_Power']]/*:amount)") as Double
log.info result