Not quite the same, but I've now done exactly the above and get the same error.
Note - the error appears in a popup window. I've a feeling that depending on your browser settings the error may show as an exclamation mark in the status bar instead, double-clicking shows the error.
If you are using Notepad as your text editor, try to use Save As and check file encoding. XMLs work fine with UTF-8. If you have xml declaration, encodings must fit.
Just because a browser might display it doesn't mean it's valid!
IE can cope with all sorts of invalid HTML as well, making (sometimes correct!) guesses about what is intended, but the HTML is still wrong.
It's playing with words. XML contains invalid characters. Browsers are allowed to display them.
It's in the grey zone; neither valid, nor strictly invalid.
You can't compare XML and HTML. XML is very strict, HTML is very relaxed by definition.
See, understand, learn, try, use efficient