The only XPath expression for the first line :
translate(., translate(.,'0123456789', ''), '')
Note that any non-numeric character (unknown in advance) will be deleted.
:
concat(
substring-before(
translate(., translate(.,'.0123456789', ''), ''),
'.'
),
substring(
translate(., translate(.,'.', ''), ''),
1,
1
),
translate(
substring-after(
translate(., translate(.,'.0123456789', ''), ''),
'.'
),
'.',
''
)
)
XPath:
.
concat (., '.0')