Files
Ivazovsky/plugins/EasyXMLParser/Source/EasyXMLParser/Private/EasyXMLAttribute.cpp
T
2023-02-06 17:17:44 +05:00

13 lines
489 B
C++

// Copyright 2019 ayumax. All Rights Reserved.
#include "EasyXMLAttribute.h"
#include "EasyXMLElement.h"
UEasyXMLAttribute* UEasyXMLAttribute::CreateAttribute(UEasyXMLElement* ParentObject, FString _Name, FString _Value)
{
auto newAttribute = NewObject<UEasyXMLAttribute>(ParentObject == nullptr ? (UObject*)GetTransientPackage() : ParentObject);
newAttribute->Parent = ParentObject;
newAttribute->Name = _Name;
newAttribute->Value = _Value.TrimStartAndEnd();
return newAttribute;
}