Skip to content
>_ TrueFileSize.com

Sample XML Files — Free Download for Testing

Download free sample XML files — from basic structures to SOAP envelopes, RSS feeds, sitemaps, and XSD schemas. Sizes from 1KB to 5MB for testing parsers, validators, and integrations.

Generate custom XML fileCreate up to 1GB locally in your browser

sample-simple.xml

153 B
Verified file details
Filename
sample-simple.xml
Exact size
153 bytes
Displayed size
153 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-simple.xml

sample-100-records.xml

11.3 KB

100 rows

Verified file details
Filename
sample-100-records.xml
Exact size
11,589 bytes
Displayed size
11.3 KB
MIME type
application/xml
Rows
100
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-100-records.xml

sample-1000-records.xml

114 KB

1,000 rows

Verified file details
Filename
sample-1000-records.xml
Exact size
116,889 bytes
Displayed size
114 KB
MIME type
application/xml
Rows
1,000
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-1000-records.xml

sample-soap.xml

216 B
Verified file details
Filename
sample-soap.xml
Exact size
216 bytes
Displayed size
216 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-soap.xml

sample-rss.xml

3.1 KB
Verified file details
Filename
sample-rss.xml
Exact size
3,139 bytes
Displayed size
3.1 KB
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-rss.xml

sample-sitemap.xml

465 B
Verified file details
Filename
sample-sitemap.xml
Exact size
465 bytes
Displayed size
465 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-sitemap.xml

sample-config.xml

222 B
Verified file details
Filename
sample-config.xml
Exact size
222 bytes
Displayed size
222 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-config.xml

sample-svg.xml

156 B
Verified file details
Filename
sample-svg.xml
Exact size
156 bytes
Displayed size
156 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-svg.xml

sample-with-attributes.xml

4.4 KB
Verified file details
Filename
sample-with-attributes.xml
Exact size
4,483 bytes
Displayed size
4.4 KB
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-with-attributes.xml

sample-namespace.xml

260 B
Verified file details
Filename
sample-namespace.xml
Exact size
260 bytes
Displayed size
260 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-namespace.xml

sample-schema.xsd

453 B
Verified file details
Filename
sample-schema.xsd
Exact size
453 bytes
Displayed size
453 B
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-schema.xsd

sample-large.xml

1.12 MB
Verified file details
Filename
sample-large.xml
Exact size
1,176,271 bytes
Displayed size
1.12 MB
MIME type
application/xml
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/xml/sample-large.xml

Common XML formats

FormatUseFile
RSS / AtomBlog/podcast syndication feedssample-rss.xml
SOAPWeb service messaging protocolsample-soap.xml
SVGScalable vector graphicssample-svg.xml
SitemapSearch engine site mapsample-sitemap.xml
ConfigApp configuration (Maven, Spring)sample-config.xml
XSDXML Schema Definitionsample-schema.xsd

Sample XML preview

<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <book id="bk101">
    <author>Gambardella, Matthew</author>
    <title>XML Developer's Guide</title>
    <genre>Computer</genre>
    <price>44.95</price>
  </book>
</catalog>

XML vs JSON in 2025

JSON preferred for

  • REST APIs (standard since ~2010)
  • Frontend/JavaScript applications
  • Configuration files (package.json, tsconfig)
  • NoSQL databases (MongoDB, Firebase)

XML still dominant in

  • Enterprise systems (SOAP, WSDL)
  • Configuration files (Maven, Spring, Android)
  • Microsoft Office formats (DOCX, XLSX)
  • RSS/Atom feeds, sitemaps, SVG

Use cases for sample XML files

  • Testing XML parsers (DOM, SAX, StAX)
  • Validating XML against XSD schemas
  • Testing SOAP API integrations
  • Verifying RSS/Atom feed readers
  • Testing sitemap generation and parsing
  • Verifying namespace handling in XML processors

Technical specifications

EncodingUTF-8
VersionsXML 1.0 (most common)
ValidationXSD schema included
NamespacesNamespace variant included
Size range1 KB to 5 MB

Frequently Asked Questions

Is XML still relevant in 2025?
Yes. While JSON has replaced XML for REST APIs, XML remains dominant in enterprise systems (SOAP, WSDL), configuration files (Maven, Spring, Android), document formats (DOCX, XLSX, SVG), and data interchange standards (HL7 in healthcare, XBRL in finance).
What is XSD and how do I use it?
XSD (XML Schema Definition) defines the expected structure, data types, and constraints for an XML document. Use our sample-schema.xsd to validate XML files programmatically with libraries like lxml (Python), xmllint (CLI), or javax.xml.validation (Java).
What are XML namespaces used for?
Namespaces prevent element name conflicts when combining XML from different sources. For example, a <table> element could mean an HTML table or a furniture table — namespaces disambiguate. Our sample-namespace.xml demonstrates proper namespace usage.
How do I parse XML in JavaScript?
Browser: new DOMParser().parseFromString(xmlString, 'text/xml'). Node.js: use libraries like xml2js, fast-xml-parser, or cheerio. For streaming large XML, use sax-js.
What is the difference between SOAP and REST?
SOAP uses XML envelopes with strict schemas — common in enterprise and financial systems. REST uses JSON (usually) with flexible endpoints — standard for web APIs. Our sample-soap.xml lets you test SOAP message parsing.

Other data formats

Related reading