XML TutorialLesson 5Free preview
XML Syntax
This lesson is part of XML · All levels
Summary
XML syntax has strict rules for valid documents to be parsed: each element must be closed, the attribute must be quoted, the writing is case-sensitive, and the comment is written with <!-- -->. The <?xml version="1.0?" declaration is optional but commonly used in the first row. Violations of these rules make the document considered unwell-formed.
Key points
- Each opening tag should have a suitable closing tag
- All value attributes must be wrapped with quotation marks
- XML case-sensitive, as opposed to (<Menu>) (<menu>)
- Comments are written and not to be confused (<!-- text -->)
- The square brackets <and> in the text should be escaped with the entity
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.