I am using Selenium in Java to capture values from the below code snippet. But it's returning a null value.
<div class="selenium" style="max-height: 0px !important; max-width: 0px !important;">
<div class="share metric">
<span id="nsf" class="nsf">
"2.2210636079249215+2.224479431183342+2.2244191794364805+2.2635962763351296+2.289855072463768+2.3309352517985613+2.3216783216783217+2.360018509949098+null+2.042235790730032+0.000006222369997702123+0</span></div>
I tried using
driver.findElement(By.xpath("//div[@class='share metric']/span[@id='nsf']")).getAttribute("value")
and
driver.findElement(By.xpath("//div[@class='share metric']/span[@id='nsf']")).gettext()