Jump to content
Sign in to follow this  

How do you make calculations in XML?

Recommended Posts

I have one section of XML that the user can enter data.Such as: <numbercontrol name="gearamount1"> <bounds rect="17,48,37,18" /> <nodrag /> <nodrop /> <noreset /> <description text="How many of these do you have" /> <limits minimum="0" /> <tabtarget next="gearitem1" prev="baserate" /> </numbercontrol> <stringcontrol name="gearitem1"> <bounds rect="60,48,200,18" /> <description text="What is this" /> <tabtarget next="gearweight1" prev="gearamount1" /> </stringcontrol> <numbercontrol name="gearweight1"> <bounds rect="345,48,38,18" /> <nodrag /> <nodrop /> <noreset /> <description text="How much does this weigh" /> <limits minimum="0" /> <tabtarget next="gearamount2" prev="gearitem1" /> </numbercontrol>Tese continue on for several rows.Now at the end I want a total weight of all of them.In a simplified form what I want is "gearamount1" times "gearweight1" plus "gearamount2" times "gearweight2" ... plus "gearamount..." times "gearweight..." <numbercontrol name="totalweight"> <bounds rect="159,7,41,22" /> <nodrag /> <nodrop /> <noreset /> ... here is where that total would be... </numbercontrol>Thank you in advance,Bakshara

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...