Skip to content
Novus Examples
xml344 B

Sample XML

A well-formed XML catalogue with nested elements and attributes — for testing XML parsers and XPath queries.

Preview — first 14 linesxml
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
  <product id="1">
    <name>Widget</name>
    <price currency="USD">9.99</price>
    <tags><tag>tools</tag><tag>hardware</tag></tags>
  </product>
  <product id="2">
    <name>Gadget</name>
    <price currency="USD">19.99</price>
    <tags><tag>electronics</tag></tags>
  </product>
</catalog>

Specifications

Elements
catalog › product › name/price/tags
Attributes
true
Declaration
UTF-8

What is a .xml file?

XML (Extensible Markup Language) is a verbose, self-describing markup language using nested tags, attributes, and namespaces to represent structured, hierarchical data. It supports schemas, entities, and validation and underlies many document and data formats. It remains common in enterprise, publishing, and interchange contexts.

How to use this file

Use an example XML file to test parsers, namespace and schema validation, XPath queries, and protection against entity-expansion and external-entity attacks.

Generated by generation/data_structured.py. Free for any use, no attribution required — license.