Question
-----------------
Such an XML file is related to the commodity lattice table. The content is as follows:
<? XML version = "1.0" encoding = "UTF-8"?>
<Lattice table>
<Product name example = "Product example">
<Single-digit = "RMB/current"> 9.00 </single-digit>
<Data bit = "current"> 100 </data volume>
<Discount> 0.95 </discount>
<Other discount Units = "Yuan"> 10 </other benefits>
<Calculation table type> discount for "quantity *" per unit "-other benefits </calculation table type>
</Item>
<Product name detail = "Cup">
<Single-digit = "RMB/individual"> 2.00 </single-digit>
<Data unit = "individual"> 200 </data>
<Discount> 0.98 </discount>
<Additional ticket bit = "RMB"> 10 </additional ticket>
<Computation table formula> single volume * Data Volume * discount + additional volume </computation table formula>
</Item>
</Lattice table>
The current requirements are:
The formula for calculating the table above the root partition (which can be customized by hour and may change in time) is used to obtain the value of each item.
Note: The formula of the above example is different from that of the Cup calculation table.
How can I use C # To calculate the inventory value of each product on an automatic basis?
Ideas:
(1) When using XPath?
(2) Use dataset?
(3) The values of the dynamic calculation table formula are calculated using the string embedding row, similar to eval () in JavaScript ().
(Waiting for Renewal)