I have a simple xml file which I need to read in c++. I am working on Windows so I choose MSXML. And it wouldn't be a problem if not for the way of how data is saved in the xml file. I cannot modify files as I have a lot of them + I can get a lot more in future. So the part that interest me the most in the xml file is:
<data>
<sample cost="2.000000000000000e+01">1</sample>
</data>
In the beginning of the xml I have specified a precision of the number and how much digits can be ignored.
So far by doing:
MSXML::IXMLDOMNodeListPtr temp = xmlDoc->selectNodes("data/*");
temp->Getitem(0)->Getxml();
gives me whole line as a string also:
temp->Getitem(0)->Gettext();
gives me a number between sections (in this case it is 1) but as a string. I dont know how to get access to a number in <> without manualy getting it from string returned by Getxml().
Getting this numbers manualy from string and converting them to double and int isnt a problem but I want to know if there is a way to directly get access to this numbers in double and int format.