protected void Page_Load(object sender, EventArgs e)
{
XmlDocument doc = new XmlDocument();
XmlNodeList lstIsValid = doc.GetElementsByTagName("IsValid");
if (lstIsValid.Count > 0 && lstIsValid[0].InnerXml == "True")
{
XmlNodeList lstItems = doc.GetElementsByTagName("Children");
if (lstItems.Count > 0)
{
XmlNode nItem = lstItems[0];
foreach (XmlNode nChild in nItem.ChildNodes)
{
if (nChild.Name == "BrowseNode") //string compare !
{
// Response.Write(nChild["Name"].InnerText + "<br>"); // Response.Write(nChild["BrowseNodeId"].InnerText + "<br>"); //strname=strname+"<a href="+nChild["BrowseNodeId"].InnerText+"><"+ nChild["Name"].InnerText + "</a><br>";strname = strname +
"<a href=" + nChild["BrowseNodeId"].InnerText + ">" + nChild["Name"].InnerText + "</a><br/>";}
}
Response.Write(strname);
//Label1.Text = strname;}
}
}
}
No comments:
Post a Comment