diff --git a/Ooui/Element.cs b/Ooui/Element.cs index ea203b1..cbd1430 100644 --- a/Ooui/Element.cs +++ b/Ooui/Element.cs @@ -232,6 +232,8 @@ namespace Ooui protected virtual bool HtmlNeedsFullEndElement => false; +#if !NO_XML + public override void WriteOuterHtml (System.Xml.XmlWriter w) { w.WriteStartElement (TagName); @@ -262,5 +264,7 @@ namespace Ooui c.WriteOuterHtml (w); } } + +#endif } } diff --git a/Ooui/Node.cs b/Ooui/Node.cs index c7456f6..4d9ad8c 100644 --- a/Ooui/Node.cs +++ b/Ooui/Node.cs @@ -188,6 +188,8 @@ namespace Ooui return false; } +#if !NO_XML + public virtual string OuterHtml { get { using (var stream = new System.IO.MemoryStream ()) { @@ -206,6 +208,8 @@ namespace Ooui } public abstract void WriteOuterHtml (System.Xml.XmlWriter w); + +#endif } class ReadOnlyList : IReadOnlyList diff --git a/Ooui/TextArea.cs b/Ooui/TextArea.cs index f3f2d5f..e6864b2 100644 --- a/Ooui/TextArea.cs +++ b/Ooui/TextArea.cs @@ -55,9 +55,13 @@ namespace Ooui return base.TriggerEventFromMessage (message); } +#if !NO_XML + public override void WriteInnerHtml (System.Xml.XmlWriter w) { w.WriteString (val ?? ""); } + +#endif } } diff --git a/Ooui/TextNode.cs b/Ooui/TextNode.cs index 8fccf8c..b94625c 100644 --- a/Ooui/TextNode.cs +++ b/Ooui/TextNode.cs @@ -21,9 +21,13 @@ namespace Ooui Text = text; } +#if !NO_XML + public override void WriteOuterHtml (System.Xml.XmlWriter w) { w.WriteString (text); } + +#endif } }