Hi, I am trying to write out some game settings into an xml file.
I have:
void ADataStorage::SaveXmlSettings(FString name, FVector translation)
{
FXmlFile* saveFile = new FXmlFile;
FXmlNode* Root = saveFile->GetRootNode();
//Root->SetContent(name);
//Root->AppendChildNode("name", name);
if(saveFile->Save(SaveDir + "/" + name+ ".xml"))
{ }
}
With those lines commented out, it works fine. But trying either SetContent on the rootnode, or appending a child node, crashes the game. When i run it without them, the xml only contains:
<?xml version="1.0" encoding="UTF-8"?>
It seems like there is not a root node. How can I create one? No answer in the docs.
Thanks!