Click to See Complete Forum and Search --> : extracting data from XML to present on individual HTML pages


Zak
01-21-2005, 10:46 AM
Hi all,
I am a newcomer to XML, so please forgive me if this Q seems a little silly.

Basically i have an XML file with several sections within it.

eg: Cars, motorbikes, vans etc.
Within each category is sub categories manufacturers like Ford, Toyota... and within each manufacturer category there are more sub categories such as price, Model number, year etc.

I have all the data stored in one root element <list> on an xml file, and i want to produce a set of static html pages from these files which the user can navigate through. Firstly presented with the Main category section on a page such as:

Cars
Motorbikes
Vans

the user can click on a category and be taken to the sub categories etc.

However I am not sure how to extract the appropriate data and present it in individual pages in accordance to where the user clicks.

I am thinking I must use Xpath, or a location path..though I am not entirely sue how to do this ?
Any help would be much appreciated.

Z

NewsWired_net
01-22-2005, 11:19 AM
Well there are several ways you can accomplish what you need.

You could use the XpathDoc or a Dataset or XSLT or others depending on the layout of your XML File.

If you could post an excerpt from your xml file format I can give you some sample code.