Test on Introduction to XML: Syntax and Validation

Introduction to XML: Syntax and Validation for Students

Question 1 of 50%

Are XML 1.0 processors always able to fully process documents created with XML 1.1 due to their forward compatibility?

Test: XML Overview and Syntax, Android, XML DTDs and Declarations

20 questions

Question 1: Are XML 1.0 processors always able to fully process documents created with XML 1.1 due to their forward compatibility?

A. Ano

B. Ne

Explanation: XML 1.1 is stated to be 'Forward compatible', meaning newer processors (1.1) can handle older XML 1.0 documents. It does not imply that older XML 1.0 processors can fully process documents that utilize features specific to XML 1.1.

Question 2: Which of the following examples correctly demonstrates the structure of an XML prolog as presented in the study materials?

A. <!xml version="1.0" encoding="UTF-8">

B. <?xml version="1.0" encoding="utf-8"?>

C. <!-- xml version="1.0" encoding="UTF-8" -->

D. <xml_prolog version="1.0" encoding="utf-8"/>

Explanation: The study materials define the XML prolog structure with an example: '<?xml version="1.0" encoding="utf-8"?>' and '<?xml version="1.0" encoding="UTF-8"?>'. Option 1 directly matches this correct structure.

Question 3: The provided Android strings.xml example demonstrates the use of a <string-array> element.

A. Ano

B. Ne

Explanation: The study materials show an Android strings.xml example that includes a <string-array> element named 'pruvodce_obsah', which contains <item> elements.

Question 4: The provided Android strings.xml example demonstrates that a string array can directly contain multiple individual <string> elements.

A. Ano

B. Ne

Explanation: The Android strings.xml example shows a <string-array> containing <item> elements, not individual <string> elements, as a way to define an array of strings.

Question 5: Based on the provided `strings.xml` example, what kind of content can be found within an `<item>` element inside a `<string-array>`?

A. Only plain text without any formatting tags.

B. Text content, which may include HTML-like tags such as paragraphs and lists, enclosed within a CDATA section.

C. Only references to other string resources.

D. Simple numeric values.

Explanation: The `strings.xml` example shows an `<item>` within a `<string-array>` named `pruvodce_obsah` that contains a `CDATA` section. Inside this section, there is text content along with various HTML-like tags such as `<p>`, `<a>`, `<ul>`, and `<li>`, demonstrating that complex formatted text can be stored.