An XML document is Well-Formed if it a) has at least one Element and b) has a Root Element that contains the entire document and c) all Tags are properly Nested
A well-formed XML document is syntactically correct It does not have any angle brackets that are not part of tags (The entity references < and > are used to embed angle brackets in an XML document ) In addition, all tags have an ending tag or are themselves self-ending (<slide> </slide> or <slide/>) In addition, in a well-formed document, all tags are fully nested They never overlap, so this arrangement would produce an error: <slide><image> </slide></image> Knowing that a document is well formed makes it possible to process it A well-formed document may not be valid however To determine that, you need a validating parser and a DTD
b A term used to describe an XML document that meets the basic syntax requirements of XML Note that a well-formed document may not be a valid document according to its schema or DTD
A node is a well-formed XML node if it matches its respective production in [XML 1 0], meets all well-formedness constraints related to the production, if the entities which are referenced within the node are also well-formed See also the definition for well-formed XML documents in [XML 1 0]
A program that obeys the syntactic rules, the diagnosable semantic rules, and the one definition rule of the C++ standard Note that the compiler is not required to diagnose all errors, so you can have a program that is well-formed but still incorrect See also Ill-formed
A term used to describe an XML document that follows the basic rules for writing XML markup language These rules include, but are not limited to the following: Every XML document must have a root element All tags must be opened and closed XML also allows you to write empty elements by adding an ending slash before the closing bracket; for example, <address /> Tags must follow nesting rules Either single quotations (' ') or double quotations (" ") must surround the value of an attribute Go to the XML specification on the W3C Web site at http: //www w3 org for more specific information about well-formed documents
A document is well-formed when it is structured according to the rules defined in Section 2 1 of the XML 1 0 Recommendation Basically, this definition states that elements, delimited by their start and end tags, are nested properly within one another
A well-formed XML document consists of a prologue and elements; elements have a start- and end-tag or are empty elements without content; all elements are hierarchically ordered; attributes may occur within a start-tag; one enclosing root element exists for the document