Boost logo

Boost Users :

Subject: [Boost-users] [property_tree] hex integer translator
From: Steve Hartmann (shartmann_at_[hidden])
Date: 2014-02-11 11:49:40

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.


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.


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.



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at