How do i set content to an FXmlNode->RootNode?

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->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.



I was also interested for an xml writer, see a related question. I have also added a feature request for an XML generator/writer.