public void ToStringTest() { const string _xml = @"<?xml version=""1.0"" encoding=""utf-8""?> <!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""> <html lang=""ja-JP"" xml:lang=""ja-JP"" xmlns=""http://www.w3.org/1999/xhtml""> <head> <meta http-equiv=""content-type"" content=""text/html; charset=utf-8"" /> <meta http-equiv=""content-style-type"" content=""text/css; charset=utf-8"" /> <title>title1</title> <style type=""text/css""> </style> </head> <body /> </html>"; var html = new XHtml(); Assert.AreEqual(_xml, html.ToString()); }