# XML and XSD guides

Source: https://xsdhub.com/learn

Practical explanations and complete examples.

- [XML vs XSD: what each check tells you](https://xsdhub.com/learn/xml-vs-xsd): Understand the difference between XML syntax and XSD validation, with a working quantity example, namespace guidance and a practical debugging sequence.
- [Fix XML validation errors at the right layer](https://xsdhub.com/learn/fix-xml-validation-errors): Debug malformed XML, missing child elements, invalid numeric values and namespace mismatches. Practical examples explain what to inspect before changing data.
- [How to validate XML against XSD, step by step](https://xsdhub.com/learn/validate-xml-against-xsd): Use a complete XML and XSD example to check required attributes, numbers and element order. Learn how to read a failed result and retest the fix.
- [Fix XML namespace mismatches without guessing](https://xsdhub.com/learn/xml-namespaces-explained): Understand xmlns, prefixes, targetNamespace and elementFormDefault with a complete XML/XSD pair and a practical namespace debugging checklist.
- [Escape XML characters without double-encoding data](https://xsdhub.com/learn/xml-escape-characters): Fix unescaped ampersands and less-than signs, choose attribute quotes correctly, and understand when CDATA helps. Includes valid and invalid XML examples.
- [Use minOccurs and maxOccurs to control repetition](https://xsdhub.com/learn/xsd-minoccurs-maxoccurs): See how XSD occurrence limits affect missing, optional and repeated elements. Test a complete basket schema and learn why an empty element is not an absent one.
- [Read XSD data-type errors with concrete examples](https://xsdhub.com/learn/xsd-data-types): Check valid lexical forms for common XSD types with a complete schema. Fix decimal commas, boolean labels and date formats without changing the intended value.
- [Choose between xs:sequence and xs:choice](https://xsdhub.com/learn/xsd-sequence-vs-choice): Learn why XML child order can fail validation and how xs:choice expresses alternatives. Includes a complete contact schema and examples of both failure modes.
- [Fix an XML opening and ending tag mismatch](https://xsdhub.com/learn/xml-tag-mismatch): Find mismatched XML tags with a tested broken example, corrected XML and an in-browser validator. Check nesting, spelling and case.
- [Fix “This element is not expected” in XSD validation](https://xsdhub.com/learn/xsd-element-not-expected): Debug unexpected XML elements by checking sequence, namespace, spelling and occurrence rules. Try a complete failing and corrected XML/XSD pair.
- [Fix an invalid xs:date value in XML](https://xsdhub.com/learn/xsd-invalid-date): Replace ambiguous date formats with valid xs:date values. Test a complete XML/XSD example and check calendar dates, time zones and empty values.
