2012年3月27日

Building an XML document

摘要: var doc = new XDocument ( new XDeclaration ("1.0", "utf-16", "yes"), new XElement ("test", "data") );string tempPath = Path.Combine (Path.GetTempPath(), "test.xml");doc.Save (tempPath);File.ReadAllText (tempPath).Dump();Building an XML docu 阅读全文

posted @ 2012-03-27 23:43 Sanic 阅读(210) 评论(0) 推荐(0) 编辑

Building an XHTML document

摘要: var styleInstruction = new XProcessingInstruction ( "xml-stylesheet", "href='styles.css' type='text/css'");var docType = new XDocumentType ("html", "-//W3C//DTD XHTML 1.0 Strict//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" 阅读全文

posted @ 2012-03-27 23:39 Sanic 阅读(226) 评论(0) 推荐(0) 编辑

LINQ TO XML

摘要: XElement config = XElement.Parse (@"<configuration> <client name='setting1' enabled='true'> <timeout>30</timeout> </client> <client name='setting2' enabled='false'> <timeout>90</timeout> </client></configur 阅读全文

posted @ 2012-03-27 23:21 Sanic 阅读(204) 评论(0) 推荐(0) 编辑

导航