static void Main(string[] args)
{
StringBuilder strXML = new StringBuilder();
strXML.AppendLine(@"<?xml version=""1.0"" encoding=""utf-8"" ?>");
strXML.AppendLine(@"<unity>");
strXML.AppendLine(@"<NAME>황승재</NAME>");
strXML.AppendLine(@"<ADDRESS AD1=""서울시"" AD2=""염창동"" AD3=""동아3차아파트"" AD4=""307동 1101호"" />");
strXML.AppendLine(@"<HP>016-647-0678</HP>");
strXML.AppendLine(@"</unity>");
strXML.AppendLine("");
XmlDocument doc = new XmlDocument();
doc.LoadXml(strXML.ToString());
///
///
string strNode1 = doc.SelectSingleNode("unity/NAME").InnerText;
string strNode2 = doc.SelectSingleNode("unity/ADDRESS").Attributes["AD1"].Value;
doc = null;
}
'GET > Configuration' 카테고리의 다른 글
[LAST] Sample-3 xml->class & config 파일 연동 (0) | 2009.09.24 |
---|---|
[XSD.EXE] XML <->CLASS & Serialization (0) | 2009.09.24 |
CONFIG XML 의 Element 와 Attribute 를 XPATH 로 값 가져오는 방법 (0) | 2009.09.23 |
Sample-2 .. 예제파일들과 호출..여러 가지것들 (0) | 2009.09.23 |
사용자가 임의로 만든 any XML configuration file 제어 (1) | 2009.09.23 |