Sample XML File
A downloadable sample XML file with 30 fictional employee records wrapped in row elements — ready for testing parsers, XPath queries, and XML converters.
sample-employees.xml
Data Preview
| 1 | name | department | role | salary | start_date | office | |
| 2 | Marcus Chen | marcus.chen@example.com | Engineering | Senior Software Engineer | 155000 | 2019-03-15 | San Francisco |
| 3 | Priya Sharma | priya.sharma@example.com | Engineering | Staff Engineer | 178000 | 2019-06-01 | San Francisco |
| 4 | David Kim | david.kim@example.com | Engineering | Software Engineer | 125000 | 2021-01-10 | New York |
| 5 | Rachel Torres | rachel.torres@example.com | Engineering | Engineering Manager | 168000 | 2020-02-20 | San Francisco |
| 6 | James Okafor | james.okafor@example.com | Engineering | Junior Developer | 92000 | 2024-06-15 | Austin |
| 7 | Lena Vogt | lena.vogt@example.com | Engineering | DevOps Engineer | 140000 | 2022-04-01 | New York |
| 8 | Amir Patel | amir.patel@example.com | Engineering | Backend Engineer | 132000 | 2023-01-09 | London |
| 9 | Sofia Lindberg | sofia.lindberg@example.com | Design | Lead Designer | 145000 | 2019-09-12 | New York |
| 10 | Carlos Rivera | carlos.rivera@example.com | Design | UX Designer | 112000 | 2021-07-20 | San Francisco |
| 11 | Hannah Becker | hannah.becker@example.com | Design | UI Designer | 105000 | 2022-11-01 | London |
| 12 | Yuki Tanaka | yuki.tanaka@example.com | Design | Product Designer | 118000 | 2023-03-14 | San Francisco |
| 13 | Olivia Martin | olivia.martin@example.com | Marketing | VP of Marketing | 165000 | 2019-04-22 | New York |
| 14 | Ethan Brooks | ethan.brooks@example.com | Marketing | Content Strategist | 95000 | 2021-10-05 | Austin |
| 15 | Nina Kowalski | nina.kowalski@example.com | Marketing | SEO Specialist | 88000 | 2022-08-15 | New York |
| 16 | Daniel Ochoa | daniel.ochoa@example.com | Marketing | Marketing Analyst | 91000 | 2023-05-20 | Austin |
| 17 | Samira Hassan | samira.hassan@example.com | Marketing | Social Media Manager | 82000 | 2024-01-08 | London |
| 18 | Tyler Washington | tyler.washington@example.com | Sales | Sales Director | 158000 | 2019-11-30 | New York |
| 19 | Jessica Huang | jessica.huang@example.com | Sales | Account Executive | 110000 | 2020-06-14 | San Francisco |
| 20 | Ryan O'Brien | ryan.obrien@example.com | Sales | Account Executive | 105000 | 2021-03-22 | London |
| 21 | Fatima Al-Rashid | fatima.alrashid@example.com | Sales | Sales Development Rep | 72000 | 2023-09-01 | Austin |
| 22 | Kevin Dupont | kevin.dupont@example.com | Sales | Solutions Engineer | 135000 | 2022-01-17 | San Francisco |
| 23 | Megan Stewart | megan.stewart@example.com | Sales | Account Manager | 98000 | 2024-03-11 | New York |
| 24 | Laura Chen | laura.chen@example.com | HR | HR Director | 148000 | 2019-08-05 | New York |
| 25 | Brian Nakamura | brian.nakamura@example.com | HR | HR Business Partner | 105000 | 2020-12-01 | San Francisco |
| 26 | Chloe Dubois | chloe.dubois@example.com | HR | Recruiter | 78000 | 2022-05-23 | London |
| 27 | Angela Moretti | angela.moretti@example.com | HR | People Operations | 85000 | 2023-07-10 | Austin |
| 28 | Isaac Fernandez | isaac.fernandez@example.com | Engineering | Frontend Engineer | 128000 | 2022-09-19 | New York |
| 29 | Sarah Mitchell | sarah.mitchell@example.com | Design | Design Systems Lead | 138000 | 2020-04-06 | San Francisco |
| 30 | Omar Farah | omar.farah@example.com | Engineering | QA Engineer | 95000 | 2024-02-12 | London |
| 31 | Natalie Park | natalie.park@example.com | Marketing | Growth Manager | 108000 | 2021-11-28 | San Francisco |
Raw File Contents
<?xml version="1.0" encoding="UTF-8"?>
<data>
<row>
<name>Marcus Chen</name>
<email>marcus.chen@example.com</email>
<department>Engineering</department>
<role>Senior Software Engineer</role>
<salary>155000</salary>
<start_date>2019-03-15</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Priya Sharma</name>
<email>priya.sharma@example.com</email>
<department>Engineering</department>
<role>Staff Engineer</role>
<salary>178000</salary>
<start_date>2019-06-01</start_date>
<office>San Francisco</office>
</row>
<row>
<name>David Kim</name>
<email>david.kim@example.com</email>
<department>Engineering</department>
<role>Software Engineer</role>
<salary>125000</salary>
<start_date>2021-01-10</start_date>
<office>New York</office>
</row>
<row>
<name>Rachel Torres</name>
<email>rachel.torres@example.com</email>
<department>Engineering</department>
<role>Engineering Manager</role>
<salary>168000</salary>
<start_date>2020-02-20</start_date>
<office>San Francisco</office>
</row>
<row>
<name>James Okafor</name>
<email>james.okafor@example.com</email>
<department>Engineering</department>
<role>Junior Developer</role>
<salary>92000</salary>
<start_date>2024-06-15</start_date>
<office>Austin</office>
</row>
<row>
<name>Lena Vogt</name>
<email>lena.vogt@example.com</email>
<department>Engineering</department>
<role>DevOps Engineer</role>
<salary>140000</salary>
<start_date>2022-04-01</start_date>
<office>New York</office>
</row>
<row>
<name>Amir Patel</name>
<email>amir.patel@example.com</email>
<department>Engineering</department>
<role>Backend Engineer</role>
<salary>132000</salary>
<start_date>2023-01-09</start_date>
<office>London</office>
</row>
<row>
<name>Sofia Lindberg</name>
<email>sofia.lindberg@example.com</email>
<department>Design</department>
<role>Lead Designer</role>
<salary>145000</salary>
<start_date>2019-09-12</start_date>
<office>New York</office>
</row>
<row>
<name>Carlos Rivera</name>
<email>carlos.rivera@example.com</email>
<department>Design</department>
<role>UX Designer</role>
<salary>112000</salary>
<start_date>2021-07-20</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Hannah Becker</name>
<email>hannah.becker@example.com</email>
<department>Design</department>
<role>UI Designer</role>
<salary>105000</salary>
<start_date>2022-11-01</start_date>
<office>London</office>
</row>
<row>
<name>Yuki Tanaka</name>
<email>yuki.tanaka@example.com</email>
<department>Design</department>
<role>Product Designer</role>
<salary>118000</salary>
<start_date>2023-03-14</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Olivia Martin</name>
<email>olivia.martin@example.com</email>
<department>Marketing</department>
<role>VP of Marketing</role>
<salary>165000</salary>
<start_date>2019-04-22</start_date>
<office>New York</office>
</row>
<row>
<name>Ethan Brooks</name>
<email>ethan.brooks@example.com</email>
<department>Marketing</department>
<role>Content Strategist</role>
<salary>95000</salary>
<start_date>2021-10-05</start_date>
<office>Austin</office>
</row>
<row>
<name>Nina Kowalski</name>
<email>nina.kowalski@example.com</email>
<department>Marketing</department>
<role>SEO Specialist</role>
<salary>88000</salary>
<start_date>2022-08-15</start_date>
<office>New York</office>
</row>
<row>
<name>Daniel Ochoa</name>
<email>daniel.ochoa@example.com</email>
<department>Marketing</department>
<role>Marketing Analyst</role>
<salary>91000</salary>
<start_date>2023-05-20</start_date>
<office>Austin</office>
</row>
<row>
<name>Samira Hassan</name>
<email>samira.hassan@example.com</email>
<department>Marketing</department>
<role>Social Media Manager</role>
<salary>82000</salary>
<start_date>2024-01-08</start_date>
<office>London</office>
</row>
<row>
<name>Tyler Washington</name>
<email>tyler.washington@example.com</email>
<department>Sales</department>
<role>Sales Director</role>
<salary>158000</salary>
<start_date>2019-11-30</start_date>
<office>New York</office>
</row>
<row>
<name>Jessica Huang</name>
<email>jessica.huang@example.com</email>
<department>Sales</department>
<role>Account Executive</role>
<salary>110000</salary>
<start_date>2020-06-14</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Ryan O'Brien</name>
<email>ryan.obrien@example.com</email>
<department>Sales</department>
<role>Account Executive</role>
<salary>105000</salary>
<start_date>2021-03-22</start_date>
<office>London</office>
</row>
<row>
<name>Fatima Al-Rashid</name>
<email>fatima.alrashid@example.com</email>
<department>Sales</department>
<role>Sales Development Rep</role>
<salary>72000</salary>
<start_date>2023-09-01</start_date>
<office>Austin</office>
</row>
<row>
<name>Kevin Dupont</name>
<email>kevin.dupont@example.com</email>
<department>Sales</department>
<role>Solutions Engineer</role>
<salary>135000</salary>
<start_date>2022-01-17</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Megan Stewart</name>
<email>megan.stewart@example.com</email>
<department>Sales</department>
<role>Account Manager</role>
<salary>98000</salary>
<start_date>2024-03-11</start_date>
<office>New York</office>
</row>
<row>
<name>Laura Chen</name>
<email>laura.chen@example.com</email>
<department>HR</department>
<role>HR Director</role>
<salary>148000</salary>
<start_date>2019-08-05</start_date>
<office>New York</office>
</row>
<row>
<name>Brian Nakamura</name>
<email>brian.nakamura@example.com</email>
<department>HR</department>
<role>HR Business Partner</role>
<salary>105000</salary>
<start_date>2020-12-01</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Chloe Dubois</name>
<email>chloe.dubois@example.com</email>
<department>HR</department>
<role>Recruiter</role>
<salary>78000</salary>
<start_date>2022-05-23</start_date>
<office>London</office>
</row>
<row>
<name>Angela Moretti</name>
<email>angela.moretti@example.com</email>
<department>HR</department>
<role>People Operations</role>
<salary>85000</salary>
<start_date>2023-07-10</start_date>
<office>Austin</office>
</row>
<row>
<name>Isaac Fernandez</name>
<email>isaac.fernandez@example.com</email>
<department>Engineering</department>
<role>Frontend Engineer</role>
<salary>128000</salary>
<start_date>2022-09-19</start_date>
<office>New York</office>
</row>
<row>
<name>Sarah Mitchell</name>
<email>sarah.mitchell@example.com</email>
<department>Design</department>
<role>Design Systems Lead</role>
<salary>138000</salary>
<start_date>2020-04-06</start_date>
<office>San Francisco</office>
</row>
<row>
<name>Omar Farah</name>
<email>omar.farah@example.com</email>
<department>Engineering</department>
<role>QA Engineer</role>
<salary>95000</salary>
<start_date>2024-02-12</start_date>
<office>London</office>
</row>
<row>
<name>Natalie Park</name>
<email>natalie.park@example.com</email>
<department>Marketing</department>
<role>Growth Manager</role>
<salary>108000</salary>
<start_date>2021-11-28</start_date>
<office>San Francisco</office>
</row>
</data>
Schema
| Field | Type | Description |
|---|---|---|
| name | string | Employee full name. |
| string | Work email address on the fictional example.com domain. | |
| department | string | One of Engineering, Sales, Marketing, HR, or Design. |
| role | string | Job title within the department. |
| salary | number | Annual salary in USD — text content that parses as an integer. |
| start_date | date | Hire date as ISO 8601 text (YYYY-MM-DD). |
| office | string | Office location — San Francisco, New York, Austin, or London. |
About the XML Format
This sample wraps 30 employee records in the most conversion-friendly XML shape there is: a single <data> root containing one <row> element per record, with each of the seven fields as a child element. There are no attributes, no namespaces, no mixed content — every value lives in element text.
That structure matters because XML, unlike CSV or JSON, has no canonical way to represent a table. The same records could legally be encoded as attributes (<row name="..." salary="..."/>), as deeply nested department groupings, or with per-record element names. Tools that turn XML into rows and columns handle the element-per-field layout best, so this file is a reliable fixture for testing XML to CSV conversion — and the site’s CSV to XML tool produces exactly this shape in reverse.
Details worth knowing when you parse it:
- Everything is text. XML carries no type system in the document itself;
<salary>155000</salary>is a string until your code says otherwise. Schema languages (XSD) can declare types, but this sample ships without one, matching how most real-world data XML travels. - Declaration and encoding. The file opens with
<?xml version="1.0" encoding="UTF-8"?>and contains no characters that need entity escaping — no&,<, or CDATA sections — so it parses under any conformant parser. - Verbosity. At roughly nine times the size of the equivalent CSV, the file is a concrete demonstration of XML’s tag overhead on tabular data.
The same 30 rows are available in eleven formats in this section — see the JSON sample for the object-based equivalent and the CSV sample for the flat baseline — so you can round-trip between formats and diff the output.