I have a valueTree that contains a load of project properties. Thanks to some very elegant methods I can easily write these properties to a settings files using:
ScopedPointer<XmlElement> data (propertyValueTree.createXml()); getUserSettings()->setValue ("PROJECT_SETTINGS", data);
However, I can’t seem to load the properties from my settings file into a new ValueTree? I thought that after I call setValue() I might be able to do something like this:
ScopedPointer<XmlElement> xmlData = getUserSettings()->createXml("PROJECT_SETTINGS"); newValueTree.fromXml(*xmlData); XmlElement * el = newValueTree.createXml(); el->writeToFile(File("/home/rory/Desktop/Example6.xml"), String::empty); delete el;
But it seems that newValueTree doesn’t contain any of the data that is stored in my settings file? Any ideas what I might be doing wrong? If it’s not obvious I can prepare a simple demo.