Class representing an XML file 更多...
#include <XmlFile.h>
Public 成员函数 | |
| void | Clear () |
| Clears the file of all internals. 更多... | |
| FXmlFile () | |
| Constructs the file without a path | |
| FXmlFile (const FString &InFile, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile) | |
| Constructs the file with the passed path. 更多... | |
| FString | GetLastError () const |
| Gets the last error message from the class | |
| FXmlNode * | GetRootNode () |
| Returns the root node of the loaded file. 更多... | |
| const FXmlNode * | GetRootNode () const |
| Returns the root node of the loaded file. 更多... | |
| bool | IsValid () const |
| Checks to see if a file is loaded | |
| bool | LoadFile (const FString &Path, EConstructMethod::Type ConstructMethod=EConstructMethod::ConstructFromFile) |
| Loads the file with the passed path. 更多... | |
| bool | Save (const FString &Path) |
| Write to disk, UTF-16 format only at the moment 更多... | |
Class representing an XML file
| 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 |
| void FXmlFile::Clear | ( | ) |
Clears the file of all internals.
Note: Makes any existing pointers to FXmlNode's INVALID
| 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::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 |