XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 7th, 2003, 12:12 PM
Tornado973 Tornado973 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 1 Tornado973 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Tornado973
Using an XML to Populate List Box

Can Some Help me, I am tryng to Populate a select box from XML database. My file name is FavoriteMovies.xml. Here is an example:
-<FavoriteMovies>
- <Movie>
<Title>ROCKY IV</Title>
<LeadActor>Sylvester Stallone</LeadActor>
<LeadActress>Talia Shire</LeadActress>
<Plot>Written and directed by Sylvester Stallone and starring familiar faces Stallone, Talia Shire, Carl Weathers, and Burt Young, ROCKY IV finds Balboa maturing, having to deal with a growing family as well as reevaluating his career and his future. The intense battles between Balboa and Drago were representative at the time of the last gasps of the cold war.</Plot>
<SupportingActors1>Dolph Lundgren</SupportingActors1>
<SupportingActors2>Carl Weathers</SupportingActors2>
<Image>Rocky4.jpg</Image>
</Movie>
- <Movie>
-</FavoriteMovies>

I am trying to have a home page where i have a select box that you can choose a Movie and Then after you select a movie View the Movie Details on the next page. Can some one please help me. Thanks

Reply With Quote
  #2  
Old October 16th, 2003, 09:37 AM
gbrethen gbrethen is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 6 gbrethen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post use xsl!

You can use an xsl stylesheet to itterate through the xml and display it in a select box.

e.g.
<xsl:for-each select="movie">
<option><xsl:value-of select="movietitle"></option>

I often use the xsl approach to achieve display of xml.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Using an XML to Populate List Box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT