What's the difference between well formed XML and validated XML? How can XML be well formed if it doesn't validate?
There seems to be a lot of confusion regarding this and some Vista related matters. Google finds many blogs saying Vista only supports "well formed RSS". Is that really the same as well formed XML? If something does not validate as XML, is it XML? I'm inclined
to think no.
-
-
androidi wrote:
What's the difference between well formed XML and validated XML? How can XML be well formed if it doesn't validate?
There seems to be a lot of confusion regarding this and some Vista related matters. Google finds many blogs saying Vista only supports "well formed RSS". Is that really the same as well formed XML? If something does not validate as XML, is it XML? I'm inclined to think no.
Well formed XML is the one where all tags are properly closed, element content does not contain forbidden characters (like "<" and "&") and so on - in other words, the XML that conforms to the XML syntax is well formed.
This is weaker than saying that XML is valid according to DTD/XSD (schema). Schema dictates exactly which tags are present and in what order/relationship, what is allowed content etc.
Well formed RSS would be RSS (which is just an XML with "known" tags) with XML syntax satisfied. It can contain elements/attributes that should not be there, it can also have content of elements/attributes that is not there but at least it's valid XML.
In other words, this means that Vista will allow you to consume feeds that might not be proper RSS, but at least they are well-formed XML so the code can load the XML and then try to guess the intent of the author in respect to RSS. If XML was not well-formed, you wouldn't be able to load it - XML parser would not accept it.
The reason for all this is that beleive it or not, many people produce RSS feeds which are not even well-formed XML, let alone proper RSS. Unfortunately, there isn't an official schema for RSS so to a certain extent it is debatable what goes where in an RSS document.
-
draza wrote:there isn't an official schema for RSS
For reference: RSS 2.0 specification
(not the same thing as a schema, granted) -
Thanks for the concise explanation... It would be most interesting to hear from RSS Team what kind of Atom will they accept, will "anything" go as Atom or will it be more like "strict".
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.