Display Links from XML file

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

Hello,

I have a XMl file with the following format:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap
xmlns = "http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode>
<siteMapNode
url = "~/Default.aspx"
title = "Home"/>
<siteMapNode
url = "~/Collection.aspx"
title = "Colection"/>
....

I need to display the links in the XML file as follows:

Home | Collection

So basically, I need to retrieve each node "title" and "url" and create
a link with it followed by "|".

My questions are:

1. How can I access the XML file and retrieve the "title" and "url"
attributes values node by node.

2. Which Asp.Net control should I use to place the links side by side?

Is there a link list or something like that?

I am using Asp.Net 2.0

Thanks,

Miguel
 
Hello Miguel,
If you are using a *.sitemap file you can use the SiteMapPath control, it
will automatically do what you want
Regards,
Mohamed Mosalem
 
Back
Top