Search code examples
c++xmlboostinputboost-propertytree

How to feed Boost.PropertyTree with a string, not a file?


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)?


Solution

  • Wrap the string in an istringstream.