Yes I totally overlooked this and wrote a template. But it is probably full of error, so I better take the value that is there directly by the junos:seconds attribute.
The xml showed this
<elapsed-time junos:seconds="285963">3d 7:26:03</elapsed-time>
and reading a value like below gave me the needed information. Thanks a lot for the help
var $get-bgp-summary = <get-bgp-summary-information>;
var $test = jcs:invoke($get-bgp-summary);
<output> $test/bgp-peer[peer-address=="1.1.1.1"]/elapsed-time/@junos:seconds