---
title: "What is a well-formed XML document?"  
description: "What is a well-formed XML document?"  
author: "Anonymous User"  
published: 2011-11-04  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/1323/what-is-a-well-formed-xml-document  
category: "xml"  
tags: ["xml"]  
reading_time: 1 minute  

---

# What is a well-formed XML document?

If a document is syntactically correct it can be called as well-formed XML documents. A well-formed document conforms to XML's basic rules of syntax:\
\

- Every open tag must be closed.
- The open tag must exactly match the closing tag: XML is case-sensitive.
- All elements must be embedded within a single root element.
- Child tags must be closed before parent tags.
- A well-formed document has correct XML tag syntax, but the elements might be invalid for the specified document type.

\
\
\

## Answers

### Answer by Anonymous User

If a document is syntactically correct it can be called as well-formed XML documents. A well-formed document conforms to XML's basic rules of syntax:\
\

- Every open tag must be closed.
- The open tag must exactly match the closing tag: XML is case-sensitive.
- All elements must be embedded within a single root element.
- Child tags must be closed before parent tags.
- A well-formed document has correct XML tag syntax, but the elements might be invalid for the specified document type.

\
\
\


---

Original Source: https://www.mindstick.com/interview/1323/what-is-a-well-formed-xml-document

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
