Is there an XML Writer in unreal?

Hi there,

Is there an XML Document writer in Unreal Engine?



Seems like it is not possible for now, I added a feature request for it:

If you haven’t found it yet there are a few classes you can look at:

FXmlFile* xmlFile = new FXmlFile();
if (xmlFile == nullptr)

FXmlNode* xmlRoot = xmlFile->GetRootNode();
if (xmlRoot == nullptr)

FXmlAttribute* xmlAttribute = new FXmlAttribute(TEXT("Name"), TEXT("MyGame"));
if (xmlAttribute == nullptr)



delete xmlAttribute;
delete xmlFile;

Thanks for the help! However as I looked over the source code one should not create a new FXmlFile without a path. You can, but then the RootNode is set to nulltpr:

/** Constructs the file without a path */
FXmlFile() : RootNode(nullptr), bFileLoaded(false) {}

Hence, the part with the GetRootNode() will return a nullptr :(.

Can it be that the API is only made for reading the XML files?


It can be done by creating the xml file from string (see

const FString FileTemplate = "<?xml version=\"1.0\" encoding=\"UTF - 8\"?>\n<root>\n</root>";
     FXmlFile * File = new FXmlFile(FileTemplate, EConstructMethod::ConstructFromBuffer);

What id the point of the FXmlAttribute here? You create it but then can never do anything with it. The return type of GetAttributes on a node is const and there is no add attribute. This confuses me because a node has a TArray of attributes but only ever can hold one. Is there any way to add an attribute to a node?

Or you can checkout this plugin.

Two years later, same Question! Did you by any chance find a solution to this? (how to add an attribute to a node)