Is there any difference between 'valid xml' and 'well formed xml'?

user18931 picture user18931 · Sep 25, 2008 · Viewed 61.2k times · Source

I wasn't aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any?

Answer

Kilhoffer picture Kilhoffer · Sep 25, 2008

There is a difference, yes.

XML that adheres to the XML standard is considered well formed, while xml that adheres to a DTD is considered valid.