Simple documentPopular
sample.xmlSmall, well-formed XML with attributes, child elements and a comment. A quick parser sanity check.
- 5 elements
- Attributes
- 1.5 KB
Real-world XML documents for testing parsers, feeds, integrations and validation, from a short record to a 10 MB catalog.
Small, well-formed XML with attributes, child elements and a comment. A quick parser sanity check.
A book catalog with IDs, ISBNs, attributes and nested elements. Good for XPath and import tests.
Valid RSS 2.0 feed with 10 items, GUIDs, dates and an Atom self link. Use it to test feed readers.
Valid sitemap protocol file with 11 URLs. Handy for SEO tools and crawler tests.
A SOAP response with header, body, namespaces and xsi types. Use it to mock legacy web services.
Default and prefixed namespaces, CDATA sections, entities, xml:lang and a processing instruction.
Deliberately broken: duplicate attribute, unescaped &, mismatched and unclosed tags, unquoted attribute, two roots.
About 10 MB of records for streaming (SAX/StAX) parsers, memory and upload tests.
Create a valid XML file of any exact size, byte for byte, right in your browser. Nothing is uploaded, and you can generate as many as you like.
| Extension | .xml |
|---|---|
| MIME type | application/xml |
| File signature | None (plain text, often starts with 3C 3F 78 6D 6C <?xml) |
| Origin | W3C, 1998 · XML 1.0 |
| Files here | 8 · 9.4 MB in total |
| License | Free for any use, no attribution |
XML (Extensible Markup Language) became a W3C recommendation in 1998. It describes structured data with nested, named elements and attributes, and it powers RSS, sitemaps, SOAP, SVG and Office documents.
Parse untrusted XML with external entities disabled. Entity expansion and external references are the root cause of XXE attacks.
import xml.etree.ElementTree as ET
root = ET.parse("files/xml/sample-rss.xml").getroot()
for item in root.iter("item"):
print(item.findtext("title"))curl -O https://samplefiles.technologychannel.org/files/xml/sample.xmlNo. They are safe to parse with any XML library. Still, keep external entity resolution turned off for untrusted input.
It has mismatched and unclosed tags and an unescaped ampersand. A conforming parser must stop with a well-formedness error.
Yes. Every XML file here is free for any use, including commercial testing, demos and tutorials. No attribution is required.
Yes, as many times as you like. There is no sign-up, no daily limit and no waiting timer. Direct links also work in scripts, CI jobs and automated tests.