Reputation: 31
from xml import xpath
from xml.dom import minidom
xmldata = minidom.parse('model.xml').documentElement
for maks in xpath.Evaluate('/cacti/results/maks/text()', xmldata):
print maks.nodeValue
And I get result:
85603399.14
398673062.66
95785523.81
But I needed to be:
85603399.14
NO SPACE
398673062.66
NO SPACE
95785523.81
Can somebody help me? I am new at programming
Upvotes: 1
Views: 255
Reputation: 1975
Use:
print maks.nodeValue,
The comma at the end doesn't insert the extra newline.
Upvotes: 3