wood burning stoves
The moose likes JSP and the fly likes Percentage Calculation during XML import Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Percentage Calculation during XML import" Watch "Percentage Calculation during XML import" New topic

Percentage Calculation during XML import

Gary Sheldon
Ranch Hand

Joined: Nov 21, 2011
Posts: 44
Hope someone can please help, I have a import process that parses an XML file and populates a database. The lines below simply read the relevant xml line and populate the test table and priceRrp field which is a decimal (10,2) with the appropriate data.

test.put("priceRrp", Subtotal3.item(i).getFirstChild().getNodeValue());

I have however another field priceRrpVat again decimal (10,2) which I would like to carry out 10% reduction of the value Subtotal3.item(i).getFirstChild().getNodeValue() and store that in the field priceRrpVat. The problem is that the value is a string, so I need to convert the string, but I have tried till I am blue in the face but no joy.

Can someone can please help?
I agree. Here's the link: http://aspose.com/file-tools
subject: Percentage Calculation during XML import
jQuery in Action, 3rd edition