REPRODUCIBLE SAMPLE

XML Sample File with Attributes and Nested Elements

Use this small XML document to check basic parsing, attributes and escaped text. It includes two fictional inventory items and no external entities.

Download and verify

format-odyssey-sample.xml ↓

Bytes
224
Media type
application/xml; charset=utf-8
SHA-256
6d4a396f559745a60e65dbf6d3549f23775eb4214fde7c2bdf903f13d13f6240
Creation
Original, reproducible test fixture

What is included

  • One inventory root with two item elements
  • Attributes, nested elements and an escaped ampersand
  • No DTD, external entity, stylesheet or schema declaration

Created for Format Odyssey and dedicated to the public domain under CC0 1.0. CC0 1.0 Universal.

Preview the sample

<?xml version="1.0" encoding="UTF-8"?>
<inventory version="1">
  <item id="demo-1"><name>Widget &amp; Cable</name><quantity>3</quantity></item>
  <item id="demo-2"><name>Box</name><quantity>12</quantity></item>
</inventory>

Try it in your workflow

Test a small XML document with attributes, nested elements and escaping.

  1. Download and inspect the XML declaration and inventory root.
  2. Parse it with your intended XML reader.
  3. Read both item elements and check the decoded ampersand in Widget & Cable.

Expected result

One inventory root and two item elements. The ampersand is written as &amp; in the source.

What this fixture covers

No DTD or external entities are included. Well-formedness does not prove compliance with a recipient’s schema.

Use it safely

Keep the checksum with the file when testing. The sample only exercises a small valid shape; it does not prove that an importer handles every variant or malicious input.

Read the Extensible Markup Language guide

Format references