Reading int and double numbers from xml file using MSXML in c++ -


i have simple xml file need read in c++. working on windows choose msxml. , wouldn't problem if not way of how data saved in xml file. cannot modify files have lot of them + can lot more in future. part interest me in xml file is:

<data>     <sample cost="2.000000000000000e+01">1</sample>  </data> 

in beginning of xml have specified precision of number , how digits can ignored.

so far doing:

msxml::ixmldomnodelistptr temp = xmldoc->selectnodes("data/*"); temp->getitem(0)->getxml();  

gives me whole line string also:

temp->getitem(0)->gettext(); 

gives me number between sections (in case 1) string. dont know how access number in <> without manualy getting string returned getxml().

getting numbers manualy string , converting them double , int isnt problem want know if there way directly access numbers in double , int format.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -