Sample XML File for Navigating XPath Axes

MSXML 5.0 SDK

Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XPath Developer's Guide

Sample XML File for Navigating XPath Axes

An XML file is structured as a hierarchical tree. This tree structuring matches the structure of family trees and organization charts.

For example, a portion of Lucerne Publishing's corporate structure might be represented by the following XML document.

To use this XML file to test the various XSLT files that contain axis templates later in this section, modify the href attribute here to reference the correct XSLT file.

XML File (orgchart.xml)

<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="orgchart.xsl"?>
<chairman empID="emp3456" empdate="1976-03-21">
    <name>Kim Akers</name>
    <president empID="emp4390" empdate="1980-06-18">
        <name>Steve Masters</name>
        <division>Domestic</division>
        <groupvp empID="emp9801" empdate="1981-09-01">
            <name>Shelly Szymanski</name>
            <department>Sales</department>
            <director empID="emp5443" empdate="1993-04-19">
                <name>Cindy Durkin</name>
                <region>Northeast</region>
            </director>
            <director empID="emp2348" empdate="1990-06-02">
                <name>Michelle Votava</name>
                <region>Southeast</region>
            </director>
            <director empID="emp4322" empdate="1995-05-26">
                <name>John Tippett</name>
                <region>Southwest</region>
            </director>
            <director empID="emp4587" empdate="1990-12-20">
                <name>Alan Steiner</name>
                <region>Northwest</region>
            </director>
        </groupvp>
        <groupvp empID="emp4320" empdate="1978-11-09">
            <name>John Thorson</name>
            <department>Marketing</department>
        </groupvp>
        <groupvp empID="emp3961" empdate="1990-01-01">
            <name>Josh Barnhill</name>
            <department>Production</department>
        </groupvp>
    </president>
    <president empID="emp4238" empdate="1984-08-12">
        <name>Katie McAskill-White</name>
        <division>International</division>
        <groupvp empID="emp7216" empdate="1987-04-13">
            <name>Neil Charney</name>
            <department>Sales</department>
            <director empID="emp9032" empdate="1982-08-31">
                <name>Beth Silverberg</name>
                <region>Africa</region>
            </director>
            <director empID="emp7634" empdate="1994-02-12">
                <name>Lani Ota</name>
                <region>Asia</region>
            </director>
            <director empID="emp9032" empdate="1991-10-03">
                <name>Peter Porzuczek</name>
                <region>Europe</region>
            </director>
        </groupvp>
        <groupvp empID="emp3833" empdate="1991-05-15">
            <name>Marea Angela Castaneda</name>
            <department>Marketing</department>
        </groupvp>
    </president>
</chairman>