<?xml version="1.0" encoding="UTF-8"?>
<!-- 
  DELIBERATELY MALFORMED XML FILE
  Provided by Sample-Files.com
  
  This file contains intentional well-formedness errors for testing
  XML parser error handling, error messages, and recovery strategies.
  
  A standards-compliant XML parser should reject this file.
  
  Errors included:
  1. Mismatched tags (line ~18)
  2. Unclosed element (line ~23)
  3. Duplicate attribute (line ~27)
  4. Unescaped ampersand in text (line ~31)
  5. Unescaped less-than in text (line ~35)
  6. Missing closing tag for nested element (line ~40)
  7. Attribute value without quotes (line ~44)
  8. Invalid character in element name (line ~48)
  9. Multiple root elements (line ~53)
  10. Missing closing root tag
-->
<catalog>
  <!-- Error 1: Mismatched opening and closing tags -->
  <book id="1">
    <title>XML Parsing Guide</ttle>
    <author>Jane Smith</author>
    <price>29.99</price>
  </book>

  <!-- Error 2: Unclosed element (no closing tag for <description>) -->
  <book id="2">
    <title>Data Formats Handbook</title>
    <description>A comprehensive guide to XML, JSON & CSV formats
    <author>John Doe</author>
  </book>

  <!-- Error 3: Duplicate attribute -->
  <book id="3" id="3-duplicate">
    <title>Advanced XSLT</title>
    <author>Bob Wilson</author>
  </book>

  <!-- Error 4: Unescaped ampersand in text content -->
  <book id="4">
    <title>XML & JSON: A Comparison</title>
    <publisher>Smith & Associates Publishing</publisher>
  </book>

  <!-- Error 5: Unescaped less-than in text content -->
  <book id="5">
    <title>When x < 10: A Mathematical Treatise</title>
    <price>if price < 50 then discount</price>
  </book>

  <!-- Error 6: Missing closing tag for nested element -->
  <book id="6">
    <title>Incomplete Structures</title>
    <chapters>
      <chapter num="1">Introduction</chapter>
      <chapter num="2">Getting Started
      <chapter num="3">Advanced Topics</chapter>
    </chapters>
  </book>

  <!-- Error 7: Attribute value without quotes -->
  <book id=7>
    <title>Unquoted Attributes</title>
    <category type=fiction>Novel</category>
  </book>

  <!-- Error 8: Invalid character in element name (spaces and special chars) -->
  <book id="8">
    <book title>Invalid Element Name With Spaces</book title>
    <price-in-$>19.99</price-in-$>
  </book>

  <!-- Error 9: Text content outside root element -->
</catalog>

This text appears after the root element closes, which is not valid XML.

<!-- Error 10: A second root element (XML allows only one) -->
<extraRoot>
  <data>This is a second root element, which violates XML rules.</data>
</extraRoot>
