Quantlib Date to and from xml file ( or to and from std::string)
Posted by
P Nelnik on
URL: http://quantlib.414.s1.nabble.com/Quantlib-Date-to-and-from-xml-file-or-to-and-from-std-string-tp8232.html
Greetings
I've been trying to read and write (QuantLib) Dates to and from xml files.
Has this been done before? (I'm guessing it has.)
One way to do it is to use the boost property_tree.
That's able to read and write string.
But then I need to convert a QuantLib Date to and from a string?
Has that been done? (I'm guessing it has!)
Any help would be much appreciated.
Thanks
Philip
P.S for the record, to read and write xml, in C++, I used:
using boost::property_tree::ptree; ptree pt;
read_xml("trade_data.xml", pt); m_tradeID = pt.get<std::string>("trade.id");
where trade_data.xml contains:
<trade>
<id>GT2341251</id>
</trade>
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users