Well-formed XML
XML is said to be "well formed" when all of the elements
in the document are properly nested within each other. In other words,
all elements within other elements must be closed before the outer elements
can be closed off:
Well-formed:
<p><emph>My name is <persName><foreName>Scott</foreName>
<surName>Hamlin.</surName></persName></emph></p>
Not Well-formed: (Where are the errors in this
sentence?)
<p><emph>My name is <persName><foreName>Scott</foreName>
<surName>Hamlin.</persName></surName></p></emph>
|