Creating dynamic menu in asp using XML

Creating dynamic menu in asp using xml is easy if you know how to get the data from an xml file and also to create an xsl template that is used for the menu. There are tools in the market that would help you to create a template in xsl easily. Use tools like Visual Studio .Net or XMLSpy which are easy in working with xsl files.

Tools like XMLSpy also give an option to create an xsl file from the html file you have. This makes your work easier instead of creating the template from the scratch.

Extracting data from xml files can be done by working with the xmldom object which has the xml file loaded in it. Use the load method to load the xml file to the xmldom object. If you want to display the content of the xml file you can get the contents and use the xsl file for transforming them in the way you want.

For creating menus, all you need is the Text that is displayed and the hyperlink for that text. The text and the hyperlink can be got from the xml file using the xmldom object and the methods available in it.

Now the actual job of displaying them like a menu is to work with your xsl template and transform the data that you get from the xml file. You have to work like in the Classic ASP, but in the ASP.Net you have the menu controls that would make your job easier.


SetApp - 100 Apps for everything you ever wanted to do on Mac

FREE Subscription

Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.

Name:
Email:

Note : We never rent, trade, or sell my email lists to
anyone. We assure that your privacy is respected
and protected.

_______________________________________







 

 

FREE Subscription

Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.

Name:

Email:

Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.

 

 

Add to My Yahoo!

Visit XML Training Material Guide Homepage

 

 

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

Copyright - © 2004 - 2019 - All Rights Reserved.