Is there a quick way to get a XML sitemap into a hierarchical data object?
Or maybe I'm going about this wrong from the get go. I would like to combine two XML files.
The first on is a sitemap:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode description="Pages" title="Pages">
<siteMapNode target="_blank" url="~/1.aspx" title="1" description="1"/>
</siteMapNode>
<siteMapNode target="_blank" url="~/2.aspx" title="2" description="2" >
<siteMapNode target="_blank" url="~/3.aspx" title="3" description="3"/>
<siteMapNode target="_blank" url="~/4.aspx" title="4" description="4"/>
</siteMapNode>
</siteMap>
The second is is more of just a data store that is used to build a menu:
<root>
<item ID="BB" InnerHtml="Group1"/>
<item ID="BB1" ParentID="BB" InnerHtml="1" Url="~/1.aspx" UrlTarget="_Blank"/>
<item ID="BB2" ParentID="BB" InnerHtml="2" Url="~/2.aspx" UrlTarget="_Blank"/>
<item ID="BB3" ParentID="BB" InnerHtml="3" Url="~/3.aspx" UrlTarget="_Blank"/>
<item ID="BD" InnerHtml="Group2"/>
<item ID="BD1" ParentID="BD" InnerHtml="4" Url="~/4.aspx" UrlTarget="_Blank"/>
<item ID="BD2" ParentID="BD" InnerHtml="5" Url="~/5.aspx" UrlTarget="_Blank"/>
<item ID="BD3" ParentID="BD" InnerHtml="6" Url="~/6.aspx" UrlTarget="_Blank"/>
</root>
I would like to only have one file to maintain.