|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Using an XML to Populate List Box |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|