public void TestManuallyCreated() { XmlLightElement root = new XmlLightElement(null, "root"); new XmlLightElement(root, "a").Attributes["b"] = "c"; new XmlLightElement(root, XmlLightElement.TEXT).Value = "Normal & <Encoded> Text"; new XmlLightElement(root, XmlLightElement.COMMENT).OriginalTag = "<!-- This is just a <simple> comment. -->"; new XmlLightElement(root, XmlLightElement.CONTROL){ OriginalTag = "<? Hey, that isn't valid !>" }.Remove(); StringWriter sw = new StringWriter(); root.WriteUnformatted(sw); Assert.AreEqual("<root><a b=\"c\"/>Normal & <Encoded> Text<!-- This is just a <simple> comment. --></root>", sw.ToString()); }