3 ms·
> XML needs to cope with invalid nesting, end tag names not matching start tag names etc. I think you read a different spec ;) http://www.w3.org/TR/REC-xml/#se
by viraptor 17y ago
> XML needs to cope with invalid nesting, end tag names not matching start tag names etc.
I think you read a different spec ;) http://www.w3.org/TR/REC-xml/#sec-logical-struct http://www.w3.org/TR/REC-xml/#sec-logical-struct :
Well-formedness constraint: Element Type Match
The Name in an element's end-tag MUST match the element type in the start-tag.
XML parser rejects the document as soon as this occurs. No different than with `{]` in JSON.
Changing " into " allows you to go to the next " without worrying about the contents before. The next " is the ending quote. Then you can resolve all the internals lazily... saving on processing time compared to JSON. For example "\"\\\"" will go through many branches and conditions. ""\"" is a simple jump over to the next " character.