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.
I think you read a different spec ;) http://www.w3.org/TR/REC-xml/#sec-logical-struct :
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.