Structure and Syntax of XML

In this section, you will explore the syntax of XML and understand what is meant by a well-formed document.

Note

You will often encounter the terms “well formed” and “valid” applied to XML documents. These are not the same. A well-formed document is structurally and syntactically correct, whereas a valid document is also semantically correct. A document can be well-formed but not valid.

The best way to become familiar with the syntax of XML is to write an XML document. To check your XML, you will need access to an XML-aware browser or another XML validator.

An XML browser includes an XML parser. To get the browser to check the syntax and structure of your XML document, simply use the browser to open the XML file. ...

Get Sams Teach Yourself J2EE™ in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.