Added ToHtml method to DynamicXml which allows you to get an IHtmlString back if you didn't want DynamicXml for XML syntactically correct data

This commit is contained in:
agrath@gmail.com
2011-06-16 09:29:38 -02:00
parent ee57f4c449
commit 97a9d11cba

View File

@@ -7,6 +7,7 @@ using System.Xml.Linq;
using System.Xml.XPath;
using System.Collections;
using System.IO;
using System.Web;
namespace umbraco.MacroEngines
{
@@ -147,7 +148,10 @@ namespace umbraco.MacroEngines
}
return root;
}
public IHtmlString ToHtml()
{
return new HtmlString(this.ToXml());
}
public DynamicXml Find(string expression)
{
return new DynamicXml(this.BaseElement.XPathSelectElements(expression).FirstOrDefault());