Skip to content
>_ TrueFileSize.com

Large XML File — 5MB Stress Test

Download a free 5MB XML file. Stress test your XML parser's memory usage, benchmark DOM vs SAX/StAX parsing performance, and validate that your application handles large XML documents without hanging or crashing.

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

Other XML files

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

Frequently Asked Questions

Should I use DOM or SAX parsing for large XML?
For files over 1MB, prefer SAX (event-based) or StAX (pull-based) streaming parsers. DOM parsing loads the entire document into memory — a 5MB XML file can use 50–100MB of RAM as a DOM tree.
How do I handle XML files that are too large for memory?
Use streaming parsers: xml.sax in Python, SAXParser in Java, sax-js in Node.js. These process elements as they're read, using constant memory regardless of file size. Process and discard each element instead of building a full tree.
What performance should I expect parsing 5MB XML?
DOM parsing: 100–500ms. SAX/StAX streaming: 50–200ms. If your parser takes longer than 1 second, check for unnecessary string copying, excessive namespace resolution, or schema validation overhead.

Other data formats

Similar files in other formats

sample-simple.json

87 B

1 rows

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

sample-mysql.sql

55.2 KB

1,000 rows

Verified file details
Filename
sample-mysql.sql
Exact size
56,547 bytes
Displayed size
55.2 KB
MIME type
application/sql
Rows
1,000
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/sql/sample-mysql.sql

sample-1kb.yaml

1 KB

30 lines

Verified file details
Filename
sample-1kb.yaml
Exact size
1,024 bytes
Displayed size
1 KB
MIME type
application/octet-stream
Lines
30
Note
simple-config
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/yaml/sample-1kb.yaml

sample-1kb.toml

1 KB

30 lines

Verified file details
Filename
sample-1kb.toml
Exact size
1,024 bytes
Displayed size
1 KB
MIME type
application/octet-stream
Lines
30
Note
simple-config
License
CC0 / Public Domain
Download URL
https://truefilesize.com/files/toml/sample-1kb.toml