UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
XmlNode.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Containers/Array.h"
7#include "CoreMinimal.h"
8
10class FXmlFile;
11
13{
14public:
15 FXmlAttribute(const FString& InTag, const FString& InValue)
16 : Tag(InTag)
17 , Value(InValue)
18 {
19 }
20
22 XMLPARSER_API const FString& GetTag() const;
23
25 XMLPARSER_API const FString& GetValue() const;
26
27private:
29 FString Tag;
30
32 FString Value;
33};
34
37{
38 friend class FXmlFile;
39
40private:
41
43 FXmlNode() : NextNode(nullptr) {}
45 FXmlNode(const FXmlNode& rhs) {}
47 ~FXmlNode() { Delete(); }
48
49private:
50
52 XMLPARSER_API void Delete();
53
54public:
55
57 XMLPARSER_API const FXmlNode* GetNextNode() const;
63 XMLPARSER_API const FXmlNode* FindChildNode(const FString& InTag) const;
67 XMLPARSER_API const FString& GetTag() const;
69 XMLPARSER_API const FString& GetContent() const;
71 XMLPARSER_API void SetContent(const FString& InContent);
74
81 {
82 return Attributes;
83 }
84
86 XMLPARSER_API FString GetAttribute(const FString& InTag) const;
87
94 XMLPARSER_API void AppendChildNode(const FString& InTag, const FString& InContent = FString(), const TArray<FXmlAttribute>& InAttributes = TArray<FXmlAttribute>());
95private:
96
98 TArray<FXmlNode*> Children;
100 TArray<FXmlAttribute> Attributes;
102 FString Tag;
104 FString Content;
106 FXmlNode* NextNode;
107
108};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition XmlNode.h:13
FXmlAttribute(const FString &InTag, const FString &InValue)
Definition XmlNode.h:15
XMLPARSER_API const FString & GetTag() const
Definition XmlNode.cpp:6
XMLPARSER_API const FString & GetValue() const
Definition XmlNode.cpp:11
Definition XmlFile.h:26
Definition XmlNode.h:37
XMLPARSER_API const TArray< FXmlNode * > & GetChildrenNodes() const
Definition XmlNode.cpp:39
XMLPARSER_API const FXmlNode * GetNextNode() const
Definition XmlNode.cpp:34
XMLPARSER_API void AppendChildNode(const FString &InTag, const FString &InContent=FString(), const TArray< FXmlAttribute > &InAttributes=TArray< FXmlAttribute >())
Definition XmlNode.cpp:107
const TArray< FXmlAttribute > & GetAttributes() const
Definition XmlNode.h:80
XMLPARSER_API void SetAttributes(const TArray< FXmlAttribute > &InAttributes)
Definition XmlNode.cpp:90
XMLPARSER_API const FXmlNode * GetFirstChildNode() const
Definition XmlNode.cpp:44
XMLPARSER_API const FXmlNode * FindChildNode(const FString &InTag) const
Definition XmlNode.cpp:56
XMLPARSER_API const FString & GetTag() const
Definition XmlNode.cpp:75
XMLPARSER_API const FString & GetContent() const
Definition XmlNode.cpp:80
XMLPARSER_API FString GetAttribute(const FString &InTag) const
Definition XmlNode.cpp:95
XMLPARSER_API void SetContent(const FString &InContent)
Definition XmlNode.cpp:85
Definition Array.h:670