#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    98
    Rep Power
    12

    How do I get XML document to repeat certain info


    My XML document for to keep competition scores in for my marching band in, needs to have certain fields repeat, just with the different information. For example:

    [code]
    <other_bands>
    <band_name>Carlisle<image src="E:\Northerm Music Site\thumbs_down.png" height="15" width="15" alt="Boo!" /></band_name>
    <score>84.10</score>
    <place>2/5</place>

    <band_name>Cumberland Valley</band_name>
    <score>81.75</score>
    <place>5/5</place>

    <band_name>Williamsport</band_name>
    <score>81.90</score>
    <place>4/5</place>
    </other_bands>
    [\code]


    Each of the places from <band_name> need to be repeat 3 times, each time with the infor for each different band. Ex: Carlisle for 1 row, CV for the second row, and Williamsport for the third row.

    However, I really don't know how to accomplish this with XML and/or XSL. Here is the XML and XSL documents in full.
    Attached Files
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Do this:

    Code:
    <other_bands>
    <band>
     <name>Carlisle<image src="E:\Northerm Music Site\thumbs_down.png" height="15" width="15" alt="Boo!" /></band_name>
     <score>84.10</score>
     <place>2/5</place>
    </band>
    
    <band>
     <name>Cumberland Valley</band_name>
     <score>81.75</score>
     <place>5/5</place>
    </band>
    
    <band>
     <name>Williamsport</band_name>
     <score>81.90</score>
     <place>4/5</place>
    </band>
    </other_bands>
    -james

IMN logo majestic logo threadwatch logo seochat tools logo