Check out Scrivo

Do you want to try out Scrivo? Then here's a demo for you that does not just get your feet wet but lets you plunge right in.

Contact us

For more information, please contact us. We're happy to help you out!

Next Sep 9 Previous

Item 547191

You are presented with this XML file:

<?xml version="1.0" encoding='UTF-8' ?>
        <phone no="12345643"></phone>
        <phone no='12345643'/>

What's wrong with this file? (choose all that apply)

A: It's not well formed.
B: It's not valid.
C: It's using a doctype: that's only for HTML not XML.
D: The strange characters in "Éloïse" should have been escaped.
E: Double and single qoutes are mixed in the same file.


Although this is clearly a quite sloppy written XML document it is definitely well formed. Also single and double quotes are both allowed in the same document so that's not the problem. The files uses UTF-8 encoding so there is no need whatsoever to escape the characters in "Éloïse".

The problem starts with the doctype. Again this is perfectly valid in XML but the doctype states that the document should validate against the XHTML 1.1 document type definition. This is clearly not the case so the document is not valid. Answer B is the only correct answer.