XmlDocument를 이용한 XML 문서 작성
using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Xml; using System.IO; namespace CH11 { class p568_AddNewContent { static void Main() { string filePath = @"..\..\booklist.xml"; XmlDocument xDoc = new XmlDocument(); xDoc.Load(filePath); XmlElement eBookList = xDoc.DocumentElement; XmlElement eBook = xDoc.CreateElement("book"); eBook.SetAttribute("..