Q4. Define the grammar rules for an XML document.
Ans. The following are some important grammar rules for XML documents:
- XML documents must have the starting and closing tags.
- XML tags are case-sensitive.
- XML elements must be properly nested.
- XML documents must have at least one root element.
- The attribute value of XML documents must be enclosed in double quotes.