如何用字符串,而不是一个文件养活Boost.PropertyTree? [英] How to feed Boost.PropertyTree with a string, not a file?
本文介绍了如何用字符串,而不是一个文件养活Boost.PropertyTree?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
加速对如何从加载XML一个教程一个文件。我怎样,我无论是在code创建或接收来自用户的字符串给它(例如,用 CIN
)?
Boost has a tutorial on how to load XML from a file. How do I feed it with a string that I either create in code or receive from a user (e.g. with cin
)?
推荐答案
裹在字符串中的<一个href=\"http://www.cplusplus.com/reference/iostream/istringstream/\"><$c$c>istringstream$c$c>.
Wrap the string in an istringstream
.
这篇关于如何用字符串,而不是一个文件养活Boost.PropertyTree?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文