11 Feb
2014
11 Feb
'14
4:49 p.m.
I am using property_tree to parse some xml files provided by outside sources. Within those xml files, sometimes integers are represented as decimal, others are represented as hex. Below is an example line where a property named Index uses a hex representation. <Index>#x7000</Index> So I tried to read this as an integer, with the following source line, but that throws an exception since it does not now how to translate the hex format from the xml file. deviceList.second.get<int>("Index") So my question is: is there a translator already included in the property_tree <that I just cannot find>, or do I need to write my own translator to deal with hex integers. Thanks, Steven