I have an xml file in below format and I decided to use libxml2 after experts suggested I go for this in this forum. I started with little knowledge.
<ACCOUNT NO="123>
<STATE> FL </STATE>
<PERCENT>10.2</PERCENT>
</ACCOUNT>
Now my question is , since value of PERCENT tag is floating, how do I read PERCENT tag value in C?
EDIT: I knew we have C function to convert it from string. My question is do we have any in-built functions in libxml2 that supports?
libxml gives you a string which you can convert to an int or float using whatever method you wish… in C strtol or strtod, using a stringstream in c++, etc etc…