The organization of the XML tags defines the (Web site optimization)

The organization of the XML tags defines the organization of options displayed in a Menu or TreeView control. In XML, it s all about nesting. Children of elements must be nested within their parent element. To illustrate, let s start with a simple example. At the top of Figure 8-7 you see a Web.sitemap file. The outermost … tags define the root element that is, the item that appears above all others of the menu. That root element is the parent to several child elements within the tags. Each of those represents a single link on a submenu below the parent. (I removed the url= and description= elements that normally appear in the siteMapNode tags for clarity.) At the bottom of Figure 8-7 I show how that SiteMap file looks in a Menu control (left) and a TreeView control (right). In both cases, the Home link is the root element at the top of the heap. Each child element is an option beneath the root element (and to the right in the case of the Menu control). In real life, you couldn t just omit the url= attribute, as that s what binds the link to a page in your site. The description= attribute just defines the ToolTip that appears when the user points to the menu item. Here s a sample Web.sitemap with all the attributes in place: Figure 8-6: A new Web. sitemap file. Chapter 8: Easy Site Navigation 159
Note: In case you are looking for affordable webhost to host and run your web application check Vision http web server services

Leave a Reply