XmlDocument 클래스
XML(Extensible Markup Lanuage)를 읽기 위한 클래스로
XML형식의 데이터를 읽거나, 편집, 유효성 검사 등을 수행할수 있다.
반응형
public void GetBookInformation(ref string title, ref string ISBN, ref string publicationDate,
ref string price, ref string genre, XmlNode book)
{
XmlElement bookElement = (XmlElement)book;
// Get the attributes of a book.
XmlAttribute attr = bookElement.GetAttributeNode("ISBN");
ISBN = attr.InnerXml;
attr = bookElement.GetAttributeNode("genre");
genre = attr.InnerXml;
attr = bookElement.GetAttributeNode("publicationdate");
publicationDate = attr.InnerXml;
// Get the values of child elements of a book.
title = bookElement["title"].InnerText;
price = bookElement["price"].InnerText;
}
Microsoft XmlDocument 클래스 : [ 링크 ]
★☆☆☆☆
반응형
댓글