Morning guys and gals,
I have a question i could really use some help with, it has been bothering me all weekend.
I have the following XML:
--------------------------
----------
----------
----------
----------
----------
----------
----------
---
<Submenus>
<PageMenu PageID="default.aspx">
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
</PageMenu>
<PageMenu PageID="test.aspx">
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
<MenuItem Name="" URL="" Target="" DisplayOrder=""/>
</PageMenu>
</Submenus>
--------------------------
----------
----------
----------
----------
----------
----------
----------
---
I am reading this XML into a dataset like so:
--------------------------
----------
----------
----------
----------
----------
----------
----------
---
DataSet ds = new DataSet();
ds.ReadXml(ServerDirectory
.GetSiteDi
rectoryPat
h() + "xml\\PageSubmenus.xml");
--------------------------
----------
----------
----------
----------
----------
----------
----------
---
Ok from this point on things have gotten a little hazy... I have tried a number of different examples and ideas with no like.
Basically my code reads the current URL of the browser and figures out what page is currently being displayed. What i thenneed to do is find the tabel inthe XML/Dataset that matches. So if they are on default.aspx i need to get <PageMenu PageID="default.aspx"> and all its <MenuItem> nodes... In fact once i have the Page menu node and all ites MenuItems nodes i want those in a DataTable that i can loop through...
I am completely open to any suggestions here even if the suggestion is to change my XML to some other schema.
Basically all this is a XML submenus for different pages of my website... once the xml is in a dataset i need help finding only the menu items for the the current page by looking at the PageID attribute of the xml...
Please help!
Nugs
Start Free Trial