XML

Question 1

Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as follows:

A validating parser will classify intro.xml as

A
Well-formed and validated
B
Well-formed but not validated
C
Validated but not well-formed
D
Neither validated nor well-formed
Question 1 Explanation: 
Note: Out of syllabus.
Question 2

Given below are several usages of the anchor tag in HTML.

Which of the above are valid?

A
1 and 2 only
B
1 and 3 only
C
1, 2 and 3 only
D
1, 2, 3 and 4
Question 2 Explanation: 
Note: Out of syllabus.
Question 3

A HTML form is to be designed to enable purchase of office stationery. Required items are to be selected (checked). Credit card details are to be entered and then the submit button is to be pressed. Which one of the following options would be appropriate for sending the data to the server. Assume that security is handled in a way that is transparent to the form design.

A
Only GET
B
Only POST
C
Either of GET or POST
D
Neither GET nor POST
Question 3 Explanation: 
Note: Out of syllabus.
Question 4

Given below is an excerpt of an xml specification.

Given below are several possible excerpts from "library.dtd". For which excerpt would the above specification be valid?

A




B




C




D




Question 4 Explanation: 
Note: Out of syllabus.
Question 5

Consider the following XML DTD describing course information in a university:

<!ELEMENT Univ (Course+, Prof+)>
<!ELEMENT Course (Title, Eval*)>
<!ATTLIST Course Number ID #REQUIRED Instructor IDREF #IMPLIED>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Eval (#PCDATA)>
<!ATTLIST Eval Score CDATA #REQUIRED>
<!ELEMENT Prof EMPTY>
<!ATTLIST Prof Name ID #REQUIRED Teaches IDREF #IMPLIED>

What is returned by the following XQuery?

let $as := //@Score
for $c in /Univ/Course[Eval]
let $cs := $c/Eval?@Score
where min($cs) > avg($as)
return $c 
A
The professor with the lowest course evaluation
B
Professors who have all their course evaluations above the university average
C
The course with the lowest evaluation
D
Courses with all evaluations above the university average
Question 5 Explanation: 
Note: Out of syllabus.
Question 6

Consider the XML document fragment given below:

Consider the XPath expression: *[not (self)::TOC]
What would be the result of the given XPath expression when the current node is Book?

A
The Title and Content elements
B
The Content and TOC elements
C
The Title and TOC elements
D
The Title, Content and TOC elements
Question 6 Explanation: 
Note: Out of syllabus.
Question 7

Which of the following is TRUE only of XML but NOT HTML?

A
It is derived from SGML
B
It describes content and layout
C
It allows user defined tags
D
It is restricted only to be used with web browsers
Question 7 Explanation: 
Note: Out of syllabus.
Question 8
Which of following statements is/are False?
1. XML overcomes the limitations in HTML to support a structured way of organizing content.
2. XML specification is not case sensitive while HTML specification is case sensitive.
3. XML supports user defined tags while HTML uses pre-defined tags.
4. XML tags need not be closed while HTML tags must be closed.
A
2 only
B
1 only
C
2 and 4 only
D
3 and 4 only
Question 9
Which of the following statements regarding XML is/are TRUE? (A) XML is a set of tags designed to tell browsers how to display text and images in a web page. (B) XML defines a syntax for representing data, but the meaning of data varies from application to application. (C) < Letter >, < LETTER > and < letter > are three different tags in XML Choose the correct answer from the options given below:
A
(A) and (B) only
B
(A) and (C) only
C
(B) and (C) only
D
(A), (B) and (C)
Question 9 Explanation: 
-XML was designed to carry data - with focus on what data is
-HTML was designed to display data - with focus on how data looks
→ FALSE: HTML is a set of tags designed to tell browsers how to display text and images in a web page.
→ TRUE
There are 9 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access