{"id":5992,"date":"2017-12-15T00:33:35","date_gmt":"2017-12-15T00:33:35","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=5992"},"modified":"2017-12-15T19:57:18","modified_gmt":"2017-12-15T19:57:18","slug":"add-or-count-values-of-xml-elements","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/add-or-count-values-of-xml-elements\/","title":{"rendered":"Add or Count Values of XML Elements"},"content":{"rendered":"<p>Complete these steps to add the values of an element in an XML file. Counting the number of elements is very similar. The distinction is in Step 7.<\/p>\n<ol>\n<li>Start the eFORMz Composer, open the project file, and load an XML data file.<\/li>\n<li>Determine which element in the XML you want to add.<\/li>\n<li>This example adds all the values of the &lt;quantity&gt; element. In the Viewer, right click quantity &gt; Add Variable.\u00a0<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-5996 aligncenter\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum2-162x300.jpg\" alt=\"\" width=\"162\" height=\"300\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum2-162x300.jpg 162w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum2-81x150.jpg 81w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum2-97x180.jpg 97w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum2.jpg 209w\" sizes=\"(max-width: 162px) 100vw, 162px\" \/><\/li>\n<li>In the Name field, add Sum to the end of the variable name so it is clear that this number is a sum. The following image shows the original values:<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-5997 aligncenter\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-300x218.jpg\" alt=\"\" width=\"300\" height=\"218\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-300x218.jpg 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-150x109.jpg 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-250x181.jpg 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-248x180.jpg 248w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3-414x300.jpg 414w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum3.jpg 495w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>In the Data Node field, move the last two nodes, order\/quantity to the Node Filter field.<\/li>\n<li>Change the Transfer method field from Normal to Sum of child elements&#8217; data, and then click OK. The following image shows the final values:<img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-5998 aligncenter\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-300x218.jpg\" alt=\"\" width=\"300\" height=\"218\" srcset=\"https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-300x218.jpg 300w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-150x109.jpg 150w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-250x182.jpg 250w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-248x180.jpg 248w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4-413x300.jpg 413w, https:\/\/c002.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/XMLSum4.jpg 495w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/li>\n<li>The value of quantitySum is the sum of the &lt;quantity&gt; elements. To count the number of elements, change the transfer method from Sum of child elements&#8217; data to Count of child elements.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Complete these steps to add the values of an element in an XML file. Counting the number of elements is very similar. The distinction is in Step 7. Start the eFORMz Composer, open the project file, and load an XML data file. Determine which element in the XML you want to add. This example adds [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[363,365,361,132,364],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5992"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=5992"}],"version-history":[{"count":1,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5992\/revisions"}],"predecessor-version":[{"id":5999,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5992\/revisions\/5999"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=5992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=5992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=5992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}