<unity>
<NAME>황승재</NAME>
<ADDRESS AD1="서울시" AD2="염창동" AD3="동아3차아파트" AD4="307동 1101호" />
<HP>016-647-0678</HP>
</unity>
section.SelectSingleNode("ADDRESS").Attributes["AD1"].Value
"서울시"
/// 더미..
section.SelectSingleNode("ADDRESS").OuterXml
"<ADDRESS AD1=\"서울시\" AD2=\"염창동\" AD3=\"동아3차아파트\" AD4=\"307동 1101호\" />"
section.SelectSingleNode("ADDRESS").Attributes["AD1"].OuterXml
"AD1=\"서울시\""
section.SelectSingleNode("NAME").InnerText;
"황승재"
#region IConfigurationSectionHandler 멤버
public object Create(object parent, object configContext, System.Xml.XmlNode section)
{
//throw new NotImplementedException();
UserInfo obj = new UserInfo();
obj._NAME = section.SelectSingleNode("NAME").InnerText; // section 이용하여 config 값 넣는다.
obj._ADDRESS = doc.SelectSingleNode("unity/ADDRESS").Attributes["AD1"].Value;
obj._HP = section.SelectSingleNode("HP").InnerText; // section 이용하여 config 값 넣는다.
return obj;
}
#endregion
'GET > Configuration' 카테고리의 다른 글
[XSD.EXE] XML <->CLASS & Serialization (0) | 2009.09.24 |
---|---|
XML 제어 - 읽기...... (0) | 2009.09.23 |
Sample-2 .. 예제파일들과 호출..여러 가지것들 (0) | 2009.09.23 |
사용자가 임의로 만든 any XML configuration file 제어 (1) | 2009.09.23 |
Unity Application Block 에서의 Configuration (1) | 2009.09.23 |