I have the following xml format:
<component>
<observation classCode="OBS" moodCode="EVN">
<value unit="mm[Hg]" value="120.0" xsi:type="PQ"/>
</observation>
</component>
I want to change value "120.0" to "120". Thus, remove the decimal part using java code.
Currently, my code is the following but it's incomplete.
NodeList nodePhysical = dom.getElementsByTagName("observation");
for (int i = 0; i < nodePhysical.getLength(); i++) {
Node node = nodePhysical.item(i);
NodeList childNodes = node.getChildNodes();
}
setAttributefunction inorg.w3c.dom.Element.