Reputation: 391
The input xml includes the following element:
<numberOfPayments>14.0</numberOfPayments>
I need to convert the number to integer, with following limitations:
Upvotes: 4
Views: 4560
Reputation: 157967
You can use round()
. The xpath query would be:
round(/numberOfPayments/text())
or if you are only interested in the integer part without rounding you can use floor()
:
floor(/numberOfPayments/text())
Upvotes: 6