Sample product catalogue XML with namespaces and CDATA

An XML product catalogue that uses a default namespace, a prefixed namespace, attributes, entity references, a CDATA section, a comment and an empty element.

Download

sample-product-catalog.xml

1.07 KB1,100 bytes

Download XML sample

Direct download. No sign-up and no waiting.

Type
application/xml
SHA-256
dfcedeb315fe33ec13a8ff7d0d48207d1c6bfe96ddaa7bbade987afa0cd2daac
Direct URL
https://sampletestfiles.com/downloads/samples/sample-product-catalog.xml

Why test with this file

Exercises the parts of XML that simple string-based parsers get wrong.

Products4
Namespaces2
FeaturesAttributes, entities, CDATA, comment, processing instruction, empty element
EncodingUTF-8

What to check

After your application has processed sample-product-catalog.xml, confirm that:

How the file begins

The opening lines of sample-product-catalog.xml, exactly as they appear in the file.

<?xml version="1.0" encoding="UTF-8"?>
<?sample-instruction keep="true"?>
<!-- A sample catalogue for parser testing -->
<catalog xmlns="https://example.com/ns/catalog" xmlns:inv="https://example.com/ns/inventory" generated="2026-01-01">
  <product id="P-100">
    <name>Standard widget</name>
    <price currency="USD">4.50</price>
    <inv:stock unit="each">120</inv:stock>
    <note>A plain widget &amp; nothing more.</note>
  </product>
  <product id="P-200">
    <name>Large widget</name>
    <price currency="USD">9.75</price>
    <inv:stock unit="each">40</inv:stock>

Preview

Shows the file contents.

Technical details

File namesample-product-catalog.xml
FormatXML (Extensible Markup Language)
Extension.xml
MIME typeapplication/xml
Size1,100 bytes (1.07 KB)
KindText
Signature3C 3F 78 6D 6C
SHA-256dfcedeb315fe33ec13a8ff7d0d48207d1c6bfe96ddaa7bbade987afa0cd2daac
Created2026-10-10
ValidationExact size, signature bytes and structure checked when the file was generated
PreviewAvailable on this page
SourceGenerated for this site; not copied from elsewhere
LicenceFree to use, modify and redistribute (terms)
CategoryData

Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked

Download from the command line and verify

Fetch the file with curl, then compare its checksum with the SHA-256 value above.

curl -o sample-product-catalog.xml 'https://sampletestfiles.com/downloads/samples/sample-product-catalog.xml'
sha256sum sample-product-catalog.xml     # Linux
shasum -a 256 sample-product-catalog.xml # macOS

On Windows, run Get-FileHash sample-product-catalog.xml -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.

About XML

Structured, self-describing documents built from nested elements and attributes.

XML format reference

Where it fits

Related files

All curated sample files