![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <XmlFile.h>
Public Member Functions | |
| FXmlFile () | |
| XMLPARSER_API | FXmlFile (const FString &InFile, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile) |
| ~FXmlFile () | |
| FXmlFile (const FXmlFile &rhs)=delete | |
| FXmlFile & | operator= (const FXmlFile &rhs)=delete |
| XMLPARSER_API bool | LoadFile (const FString &Path, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile) |
| XMLPARSER_API FString | GetLastError () const |
| XMLPARSER_API void | Clear () |
| XMLPARSER_API bool | IsValid () const |
| XMLPARSER_API const FXmlNode * | GetRootNode () const |
| XMLPARSER_API FXmlNode * | GetRootNode () |
| XMLPARSER_API bool | Save (const FString &Path) |
| XMLPARSER_API void | EnableAttemptToPreserveWhitespaceHack () |
Class representing an XML file
|
inline |
Constructs the file without a path
| FXmlFile::FXmlFile | ( | const FString & | InFile, |
| EConstructMethod::Type | ConstructMethod = EConstructMethod::ConstructFromFile |
||
| ) |
Constructs the file with the passed path. InFile is either treated as a filename to open, or as a text buffer to load.
| InFile | The path/text to use |
| ConstructMethod | Whether to load a file of use the string as a buffer of xml data |
|
inline |
|
delete |
| void FXmlFile::Clear | ( | ) |
Clears the file of all internals. Note: Makes any existing pointers to FXmlNode's INVALID
| void FXmlFile::EnableAttemptToPreserveWhitespaceHack | ( | ) |
Turns on a specific hack that is only used by the crash report client in order to retain newlines for callstacks. This is important on the server side when we display the callstacks to content creators. Without the content-whitespace, they're bascially illegible. Neither version of the DOM we create is technically true to the XML spec.
| FString FXmlFile::GetLastError | ( | ) | const |
Gets the last error message from the class
| FXmlNode * FXmlFile::GetRootNode | ( | ) |
Returns the root node of the loaded file. nullptr if no file loaded. It is assumed that there will always be one and only one root node.
| const FXmlNode * FXmlFile::GetRootNode | ( | ) | const |
Returns the root node of the loaded file. nullptr if no file loaded. It is assumed that there will always be one and only one root node.
| bool FXmlFile::IsValid | ( | ) | const |
Checks to see if a file is loaded
| bool FXmlFile::LoadFile | ( | const FString & | Path, |
| EConstructMethod::Type | ConstructMethod = EConstructMethod::ConstructFromFile |
||
| ) |
Loads the file with the passed path. Path is either treated as a filename to open, or as a text buffer to load.
| Path | The path/text to use |
| ConstructMethod | Whether to load a file of use the string as a buffer of xml data |
| bool FXmlFile::Save | ( | const FString & | Path | ) |
Write to disk, UTF-16 format only at the moment
| Path | File path to save to |