CIS 97YT Index > Lecture 4 > Lecture 4 Example

Lecture 4 Example: Club Database RNG Specification

The <contact-list> element contains one or more <contact> elements, each of which contains:

Here is a sample file created according to this description:

<?xml version="1.0" encoding="UTF-8"?>
<club-database>
<association id="SCVWA">
<club id="H23">
    <charter>2000</charter>
    <name>California Gold</name>
    <contact-list>
        <contact>
            <person>Donald Morton</person>
            <phone>408-555-0102</phone>
        </contact>
    </contact-list>
    <location>San Jose</location>
    <age-groups type="KCJ"/>
    <info>
        Practice on Mondays and Wednesdays 6-7:30pm at Glen Park HS.
        Cost is $45.00, includes USA membership card and t-shirt.
    </info>
</club>
<club id="H26">
    <charter>2002</charter>
    <name>Campbell Bulldogs</name>
    <contact-list>
        <contact>
            <person>John Moreson</person>
            <phone type="home">408-555-1092</phone>
            <phone type="work">650-555-7442</phone>
            <email>j_moreson@anyco.org</email>
        </contact>
        <contact>
            <person>Roger McClarty</person>
            <phone type="work">408-555-0960 x3251</phone>
            <email>mcclarty_r@someschool.edu</email>
        </contact>
    </contact-list>
    <location>San Jose</location>
    <age-groups type="KCJO"/>
</club>
<club id="H21">
    <charter>2002</charter>
    <name>North San Jose Wrestling</name>
    <contact>
        <person>James Frazier</person>
        <phone type="home">408-555-6528</phone>
        <email>jnf@someplace.com</email>
    </contact>
    <location>San Jose</location>
    <age-groups type="CJO"/>
</club>
</association>
</club-database>