3 ms·
Web browsers refuse to parse malformed XML.
by pwdisswordfish2 7y ago
Web browsers refuse to parse malformed XML.
- np_tedious 7y agoWhat do you mean? They definitely try to. A lot of effort is made in this direction, and IMO the results are fairly impressive
- pwdisswordfish2 7y agoNo, they don't. Try putting <foo in foo.xml and open it in a browser.
- Dylan16807 7y agoOnly when specific uncommon headers are set. Under normal circumstances, if you feed them a malformed xhtml document, they will parse it.
- pwdisswordfish2 7y agoSending XML with the proper application/xml (or some other) media type is rather common. Sending XHTML with the HTML media type doesn't count. In that case you're just sending malformed HTML which the browser doesn't recognise as XML at all.