0% found this document useful (0 votes)
253 views7 pages

Unit-2 MCQS

This document contains 30 multiple choice questions about XML. It tests knowledge on topics like the definition of XML, its purpose and capabilities, what makes an XML file well-formed and valid, the differences between DTDs and XML schemas as ways to define an XML document's structure, XML data types, and XML DOM. The questions cover basic concepts, syntax, and components of XML, DTDs, schemas, and DOM.

Uploaded by

Suseela Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
253 views7 pages

Unit-2 MCQS

This document contains 30 multiple choice questions about XML. It tests knowledge on topics like the definition of XML, its purpose and capabilities, what makes an XML file well-formed and valid, the differences between DTDs and XML schemas as ways to define an XML document's structure, XML data types, and XML DOM. The questions cover basic concepts, syntax, and components of XML, DTDs, schemas, and DOM.

Uploaded by

Suseela Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

[self]

Q1) XML stands for ?


A) Extensible Modeling Language
B) Extensible Markup Language
C) Extensible Meta Language
D) None
Answer: B

[self]
Q2) Which of the following about XML is true ?
A) Primary purpose was to provide a way to store self describing data easily.
B) Xml is used to describe structured data or information
C) Xml can be used as a primary means to manipulate and transfer structured data
over the web
D) Xml allows us to define new tags and use them
E) All
Answer: E

[self]
Q3) Which of the following are needed for an welformed xml file ?
A) Xml document must have only one root element.
B) All tags must be closed
C) All tags must be properly nested
D) Xml tags are case sensitive
E) Attributes values must always be in quotes
F) All
Answer: F

[self]
Q4) A valid xml document must be ?
A) Welformed
B) Comply with rules(structure) specified in DTD or Schema
C) Both welformed and comply with DTD or Schema
D) None
Answer: C
[self]
Q5) DTD file consists of ?
A) XML data
B) Struture(Schema) of XML data
C) Display format of Xml data
D) None
Answer: B

[self]
Q6) Which of the following is an XML Schema language ?
A) DTD
B) W3C XML Schema
C) RELAX NG
D) All
Answer: D

[self]
Q7) External DTD means the structure of the XML data is defined in a separate file ?
A) True
B) False
Answer: A

[self]
Q8) Which of the following Data Type used in DTD to define type of Element
content ?
A) String
B) PCDATA
C) varchar
D) None.
Answer: B

[self]
Q9) What is the correct syntax of declaring an attribute in DTD ?

A)<ELEMENT hr EMPTY>
<ELEMENT hr width CDATA '100'>

B)<ELEMENT hr EMPTY>
<ELEMENT width CDATA '100'>
C)<ELEMENT hr EMPTY>
<!ATTLIST hr width CDATA '100'>

D)<ELEMENT hr EMPTY>
<!ATTLIST hr width '100'>

Answer: C

Q10) Which of the following keyword need to used to make any attribute
mandatory ?
A) default
B) #REQUIRED
C) #IMPLIED
D) #FIXED
Answer: B

Q11) If an attribute is declared with the keyword #FIXED, it is optional and if does
not appear, xml provide the defined fixed value to the attribute ?
A) False
B) True
Answer: B

Q12) Which of the following statements about #IMPLIED is correct ?


A) Attribute is optional
B) If we specify the value for that implied attribute, it takes the give value.
C) No default value will be Provided
D) All
Answer: D

Q13) Which of the following is not an attribute type in DTD ?

A) String
B) Tokenized
C) ANY
D) Enumerated
Answer: C

Q14) Which of the following Tokenized type attribute restricts the attribute value to
one that a valid xml name ?
A) ID
B) IDREF
C) NMTOKEN
D) NMTOKENS
Answer: C

Q15) Which of the following Tokenized type attribute can be used to refer to external
non-parsed entities ?
A) NOTATION
B) ENTITY
C) NMTOKEN
D) NMTOKENS
Answer: C

Q16) Which of the following Tokenized type attribute can be used to specity the
format of non-xml data ?
A) NOTATION
B) ENTITY
C) NMTOKEN
D) NMTOKENS
Answer: C

Q17) Like dtd, xml schema is another xml schema language used to define the structure
of xml document ?
A) False
B) Ture
Answer: B

Q18) what is the extension of xml schema definition file ?


A) xs
B) xsd
C) schema
D) none
Answer: B

Q19) Which of the following is the root element of xml schema file. ?
A) <xs:template>
B) <xs:element>
C) <xs:schema>
D) none
Answer: C

Q20) what is the correct syntax of declaring an element in XML Schema ?


A) <!ELEMENT name=’element name’ type=’element type’>
B) <xs:element element name element type>
C) <xs:element name=’element name’ type=’element type’>
D) none
Answer: C

Q21) If no data type is specified for an element in XML Schema, which of the
following type will be assigned for that element ?
A) ANY
B) anyType
C) PCDATA
D) CDATA
Answer: B

Q22) Which of the following predefined Data type in XML Schema is not a
simple type ?
A) ANY
B) anyType
C) PCDATA
D) CDATA
Answer: B

Q23) The Data type Union is simple type or complex type ?


A) simple type
B) complex type
Answer: B

Q24) Which of the following specifies the occurence of an element to repeat


any number of times inside its parent element ?
A) minoccurs=infinity
B) maxoccurs=infinity
C) minoccurs=unbounded
D) maxoccurs=unbounded
Answer: D
Q25) An Element whose body content is empty but has attributes is a simple
type or a complex type ?
A) simple type
B) complex type
Answer: B

Q26) What is the correct syntax of specifying an attribute in XML Schema ?


A) <xs:attrib name=’attribute name’ type=’xs:string’ />
B) <xs:attribute name=’element name’ attribute=' attrib name' type=’xs:string’ />
C) <xs:attribute name=’attribute name’ type=’xs:string’ />
D) None
Answer: C

Q27) What is the correct syntax of specifying an attribute as mandatory in XML


Schema ?
A) <xs:attribute name=’id’ type=’xs:string’ ' #REQUIRED' />
B) <xs:attribute name=’id’ type=’xs:string’ use=’required’ />
C) <xs:attribute name=’id’ type=’xs:string’ '#MANDATORY’ />
D) None.
Answer: B

Q28) Which of the following is not an order indicator for the complex data type
in XML Schema ?
A) sequence
B) choice
C) all
D) union
Answer: D

Q29) Which of the following about XML DOM is true?


A) DOM models a document as a hierarchical structure consisting of different kind of
nodes.
B) Language Neutral
C) Platform Indepent
D) All
Answer: D

Q30) Each node of the document tree is a ____?


A) Object
B) Attribute
C) Text
D) None.
Answer: A

31. ______ attribute of XML tag provides for the unique naming of the code.

Answer:ID

32.To create a data island we use the _____________HTML element

Answer: .  <XML>

33.Parameter entities can appear in______________

Answer: . dtd file

34.What is an XML namespace___________________________________

Answer: A set of names representing a specific XML vocabulary

You might also like