Files
ICD.Common.Utils/ICD.Common.Utils/Xml/IcdXmlDocument.cs
Chris Cameron f7842116a4 Tidying
2017-10-12 11:45:52 -04:00

40 lines
632 B
C#

#if SIMPLSHARP
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronXml;
#else
using System.Xml;
#endif
namespace ICD.Common.Utils.Xml
{
public sealed class IcdXmlDocument
{
private readonly XmlDocument m_Document;
/// <summary>
/// Constructor.
/// </summary>
public IcdXmlDocument()
{
m_Document = new XmlDocument();
}
public void LoadXml(string xml)
{
try
{
m_Document.LoadXml(xml);
}
catch (XmlException e)
{
throw new IcdXmlException(e);
}
}
public void WriteContentTo(IcdXmlTextWriter writer)
{
m_Document.WriteContentTo(writer.WrappedWriter);
}
}
}