XmlWriterSettings settings = new XmlWriterSettings();
settings.Async = true;
StringBuilder sb = new StringBuilder();
using (XmlWriter writer = XmlWriter.Create(sb, settings))
{
await writer.WriteStartElementAsync("pf", "root", "http://ns");
await writer.WriteStartElementAsync(null, "sub", null);
await writer.WriteAttributeStringAsync(null, "att", null, "val");
await writer.WriteStringAsync("text");
await writer.WriteEndElementAsync();
await writer.WriteProcessingInstructionAsync("pName", "pValue");
await writer.WriteCommentAsync("cValue");
await writer.WriteCDataAsync("cdata value");
await writer.WriteEndElementAsync();
await writer.FlushAsync();
}
'개발 공부 > C#' 카테고리의 다른 글
.net (c#) 에서 Standard TCP/IP over SSH 접속할때 (MySQL) (0) | 2014.03.01 |
---|---|
윈도우8 메트로앱 개발참조 - 로컬에파일만들기 (FileAccess) (0) | 2013.05.14 |