In ASP i used XMLDataSource to create a small menu. For the following xml how would i get just the @nav value and create a small navigation menu like this:
Menu architecture: exhibition publication review
So far i have this:
Thanks for your help!!
Menu architecture: exhibition publication review
So far i have this:
Code:
<asp:XmlDataSource id="MySource" DataFile='architecture.xml' XPath='/architecture' runat="server"/>
<div id="nav">Menu
<asp:Repeater id="xml" DataSourceId="MySource" runat="server">
<ItemTemplate><h1><%# XPath("@fullname")%>: </h1>
<asp:Repeater id="nav" DataSource='<%# XPathSelect("@nav") %>' runat="server">
<ItemTemplate>
<a href="#"><%# XPath(".")%></a>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</div>
[architecture.xml]
<?xml version="1.0" encoding="iso-8859-1"?>
<architecture fullname="architecture">
<exhibition nav="exhibition">
</exhibition>
<publications nav="publication">
</publications>
<images nav="image">
</images>
<reviews nav="review">
</reviews>
</architecture>
Comment