I'm using boost::property_tree
. The documentation is very vague and overall unhelpful for the most part. Looking at the source/examples didn't help that much, either.
What I'm wondering is the following:
<VGHL>
<StringTable>
<Language>EN</Language>
<DataPath>..\\Data\\Resources\\Strings\\stringtable.bst</DataPath>
</StringTable>
</VGHL>
How can I iterate over all the elements at the current level? If I do this:
read_xml(fin, bifPropTree);
VGHL::String tablePath;
BOOST_FOREACH(boost::property_tree::wiptree::value_type &v,
bifPropTree.get_child(L"VGHL.StringTable"))
{
m_StringTable->ParseEntry(v.second, tablePath);
}
In ParseEntry
I try this:
VGHL::String langName = stringTree.get<VGHL::String>(L"StringTable.Language");
Results in an exception (not doesn't exist). I've also tried this:
VGHL::String langName = stringTree.get<VGHL::String>(L"Language");
Same problem.
From my understanding when I call ParseEntry
I am passing a reference to the tree at that node.
Is there any way to deal with this, when I have multiple entries of StringTable
using property tree?