Roblox-File-Format/XmlFormat/PropertyTokens/SharedString.cs
CloneTrooper1019 34642f5656 Added support for saving XML files!
Support for binary files will be coming later.
2019-05-17 07:08:06 -05:00

27 lines
713 B
C#

using System;
using System.Text;
using System.Xml;
namespace RobloxFiles.XmlFormat.PropertyTokens
{
public class SharedStringToken : IXmlPropertyToken
{
public string Token => "SharedString";
public bool ReadProperty(Property prop, XmlNode token)
{
string contents = token.InnerText;
prop.Type = PropertyType.SharedString;
prop.Value = contents;
return true;
}
public void WriteProperty(Property prop, XmlDocument doc, XmlNode node)
{
var BinaryStringToken = XmlPropertyTokens.GetHandler<BinaryStringToken>();
BinaryStringToken.WriteProperty(prop, doc, node);
}
}
}