-2

I am new to XML Language. I want to hold some value on global variable

ex:

<SET name="TotalDiscount" type="VbDouble">  0  </SET>  //Declare variable outside of for loop

<FOR each="Entry">                     
    <SET name="QtyPrice" type="VbCurrency">Price</SET>

    TotalDiscount = TotalDiscount + QtyPrice  // I want to perform like this

</FOR>

//Finally i will print TotalDiscount after for loop
Liam neesan
  • 2,282
  • 6
  • 33
  • 72
  • Please edit your question to include a more detailed description of your problem. Where is this XML code being used? What is the full source code of your XML document? What is the remaining code outside of this XML code? Which programming language are you using? What is your goal? – Progman Dec 26 '17 at 11:13

1 Answers1

0

XML itself doesn't have a notion of variables. (Although see Can I use variables in XML files? for how entities can play such a role, but that's not what you're asking here.)

On the other hand, any given application of XML may itself have variables that do have a representation in XML. The sample XML you've posted appears to be from one such application. However, that would be a question about the application, which you've not identified, not about XML.

kjhughes
  • 106,133
  • 27
  • 181
  • 240