This code sample is adapted from Clifford B. Anderson and Joseph C. Wicentowski, XQuery for Humanists (College Station: Texas A&M University Press, 2020), 187. Download this code sample in its raw form. View the source on GitHub.

<nav>
    <h2>Table of Contents</h2>
    <ul>
        <li>Chapter One
            <ul>
                <li>Introduction</li>
                <li>Section 1
                    <ul>
                        <li>Subsection 1.1</li>
                        <li>Subsection 1.2</li>
                    </ul>
                </li>
                <!-- Additional subsections -->
            </ul>
        </li>
        <li>Chapter Two
            <!-- Additional sections and subsections -->
        </li>
        <!-- Additional chapters -->
    </ul>
</nav>