일부 속성 : 페이지로드에서알 수있는 방법 아이는 XML 파일에서 XML의
<section name="header">
<placeholder name="HeaderLeftPane"></placeholder>
<placeholder name="HeaderCenterPane"></placeholder>
<placeholder name="HeaderRightPane"></placeholder>
</section>
내가이를
XmlDocument XD = new XmlDocument();
XD.Load(System.Web.HttpContext.Current.Server.MapPath("Test.xml"));
XmlNodeList nodeListName = XD.SelectNodes("layout/child::node()");
foreach (XmlNode xNode in nodeListName)
{
string name = xNode.Attributes["name"].Value;
int child = xNode.ChildNodes.Count;
LblDisplay.Text += name + child;
LblDisplay.Text += "<br/>";
}
결과 header3
.I이 name
괜찮나 할 수있는 속성 placeholder
모든 아이를 잡으려면입니다 내가 PLZ 도움말을 잡는다.
덕분에 같은 속성 빠른 응답을 위해. 나는 단지 자식 노드를 계산할 수 있지만 display.in 위의 attrributes 이름을 잡을 수 없다고 말하고 싶습니다. 위에서 'HeaderLeftPane'' HeaderCenterPane'' HeaderRightPane'을 lblDisplay.Any 아이디어에 표시하려고합니다. –
위 코드가 도움이 되나요? – Bobby