Go through XML nodes
-
Hello, I have an Asp.Net 2.0 Web.Sitemap file as follows: ... ... I want to loop through all 'siteMapNode' nodes and check if 'footer' attribute is true. If 'footer' is true I want to add the 'url' and 'title' values to a data table or to a data view. Is this possible? Can someone suggest a way to do this? Thanks, Miguel
-
Hello, I have an Asp.Net 2.0 Web.Sitemap file as follows: ... ... I want to loop through all 'siteMapNode' nodes and check if 'footer' attribute is true. If 'footer' is true I want to add the 'url' and 'title' values to a data table or to a data view. Is this possible? Can someone suggest a way to do this? Thanks, Miguel
Yes, this is possible, look into the XmlDocument, XmlNode, XmlNodeList classes, then look for simple xpath queries... something like (//sitemapnode[@footer='true']/) of just query all sitemapnodes and then look for the attribute in the XmlNode... Brandon braber