0% found this document useful (0 votes)
3K views11 pages

CS311 Mcqs MidTerm by Vu Topper RM

This document contains 50 multiple choice questions and answers related to XML and related technologies like DOM, SAX, DTD, etc. Each question is numbered and includes the correct answer. This appears to be a quiz or test with the purpose of assessing knowledge of XML fundamentals and common approaches to processing XML documents.

Uploaded by

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

CS311 Mcqs MidTerm by Vu Topper RM

This document contains 50 multiple choice questions and answers related to XML and related technologies like DOM, SAX, DTD, etc. Each question is numbered and includes the correct answer. This appears to be a quiz or test with the purpose of assessing knowledge of XML fundamentals and common approaches to processing XML documents.

Uploaded by

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

Cs-311 Important Mid Term

Mcq’s Solution 100% Correct :


Solve By Vu-Topper RM!!
Question No:1 (Marks:1) Vu-Topper RM
If the node type is _______ it is an element node
1 214

Question No:2 (Marks:1) Vu-Topper RM


The entity reference < represents ______ character.
& 178

Question No:3 (Marks:1) Vu-Topper RM


XPATH is an expression which can be used in __________.
Navigate 172

Question No:4 (Marks:1) Vu-Topper RM


In context of XML DOM, each node is a(n) ________
Representing a part of the document Google

Question No:5 (Marks:1) Vu-Topper RM


When a node is removed, ___________________________.?
Removed Child() 233

Question No:6 (Marks:1) Vu-Topper RM


An XML document is called well-formed document if
"adheres to the syntax rules specified by the XML 1.0 specification
in that it must satisfy both physical and logical structures".
175

Question No:6 (Marks:1) Vu-Topper RM


------ provides extra information about XML elements.?
Attributes 177

Question No:7 (Marks:1) Vu-Topper RM


_________ is used to transform an XML document into another XML
or HTML document.?
XSLT 170

Question No:8 (Marks:1) Vu-Topper RM


Whenever we access the nodes in the node tree via the relationship
between these nodes, is called_________.
Navigating Nodes 225
Question No:9 (Marks:1) Vu-Topper RM
The _________ property of a node list is the number of nodes in the
list.
Length 219

Question No:10 (Marks:1) Vu-Topper RM


which of the following is not the building block of xml documents?
DTD 159

Question No:11 (Marks:1) Vu-Topper RM


In XML the term PCDATA Stands for _________.
Parsed Character Data 178

Question No:12 (Marks:1) Vu-Topper RM


In a DTD, attributes are declared with an _________ declaration.
ATTLIST 182

Question No:13 (Marks:1) Vu-Topper RM


Which one is used to add unique label to an element?
Attributes 168

Question No:14 (Marks:1) Vu-Topper RM


Which of the following is used to request data from a server?
XML Http Request Object 205

Question No:15 (Marks:1) Vu-Topper RM


CDATA Stands for _________.
Character Data 178

Question No:16 (Marks:1) Vu-Topper RM


The ? sign in the example above declares that the child element
"message" can occur ____ or ____ time inside the "note" element.
zero or one time 181

Question No:17 (Marks:1) Vu-Topper RM


XPointer is the short name for the
Base Pointer 174
Question No:18 (Marks:1) Vu-Topper RM
Which property of XML document represents the root node?
The document Element property Google

Question No:19 (Marks:1) Vu-Topper RM


Name conflicts in XML elements can easily be avoided using _
Name prefix 161

Question No:20 (Marks:1) Vu-Topper RM


Use _________ keyword if you don't have an option for a default value
,but still want to force the attribute to be present.
#REQUIRED 184

Question No:21 (Marks:1) Vu-Topper RM


Which of the following specifies the type of node?
Node type 217

Question No:22 (Marks:1) Vu-Topper RM


If the DTD is pointing to ____________ then it is called External
Subset.
External Subset 176

Question No:23 (Marks:1) Vu-Topper RM


A servlet life cycle can be defined as the entire process from its creation
till the ___________.
Destruction 268

Question No:24 (Marks:1) Vu-Topper RM


XML often contains new line, or _______ space characters, between
nodes.
White 222

Question No:25 (Marks:1) Vu-Topper RM


XML files can be stored on an Internet server exactly the same way as
_files.
HTML 192

Question No:26 (Marks:1) Vu-Topper RM


How many types of cookies are in servlets? CS311
2 294
Question No:27 (Marks:1) Vu-Topper RM
For all XML documents, which of the following is true?
All XML elements must have a closing tag.
All XML documents must have a DTD or an XML schema.
All XML elements must be lowercase.
All of the statements are true.

Question No:28 (Marks:1) Vu-Topper RM


For each question, choose the best choice out of the given choices.
What does XML stand for?
A. X-Markup Language
B. eXtra Modern Link
C. Example Markup Language
D. eXtensible Markup Language

Question No:29 (Marks:1) Vu-Topper RM


XML’s goal is to replace HTML
A. True
B. False

Question No:30 (Marks:1) Vu-Topper RM


What does DTD stand for?
A. Direct Type Definition
B. Document Type Definition
C. Document Type Declaration

Question No:31 (Marks:1) Vu-Topper RM


Is this a correct XML document?
<?xml version=”1.0”?>
<to>Students</to>
<from>Teacher</from>
<heading>Reminder</heading>
<body>We are at Software Park, Thailand</body>
A. Yes
B. No

Question No:32 (Marks:1) Vu-Topper RM


Which statement is true?
A. All XML elements must have a closing tag
B. All XML documents must have a DTD or an XML schema
C. All XML elements must be lowercase
D. All of the statements are true

Question No:33 (Marks:1) Vu-Topper RM


Which statement is true?
A. XML tags are case sensitive
B. XML elements must be properly nested
C. XML documents must have the root element
D. All the statements are true

Question No:34 (Marks:1) Vu-Topper RM


XML preserves white spaces
A. True
B. False

Question No:35 (Marks:1) Vu-Topper RM


Is this a correct XML document?
<?xml version=”1.0”?>
<note>
<to age=19>Students</to>
<from>Teacher</from>
</note>
A. No
B. Yes

Question No:36 (Marks:1) Vu-Topper RM


XML elements cannot be empty
A. True
B. False

Question No:37 (Marks:1) Vu-Topper RM


Which is not a correct name for an XML element?
A. <Note>
B. <h1>
C. <1dollar>
D. All 3 names are incorrect
Question No:38 (Marks:1) Vu-Topper RM
Which is not a correct name for an XML element?
A. <age>
B. <first name>
C. <NAME>
D. All 3 names are incorrect

Question No:39 (Marks:1) Vu-Topper RM


Which is not a correct name for an XML element?
A. <xmldocument>
B. <document>
C. <doc>

Question No:40 (Marks:1) Vu-Topper RM


For the XML parser to ignore a certain section of your XML document,
which syntax is correct?
A. <xml:CDATA[ Text to be ignored]>
B. <CDATA>Text to be ignored</CDATA>
C. <![CDATA[ Text to be ignored ]]>

Question No:41 (Marks:1) Vu-Topper RM


XML is a subset of SGML
A. True
B. False

Question No:42 (Marks:1) Vu-Topper RM


XML attributes must be in double quotes
A. True
B. False

Question No:43 (Marks:1) Vu-Topper RM


XML attributes must be assigned values
A. True
B. False

Question No:44 (Marks:1) Vu-Topper RM


The Document Type Definition must be stored in an external file
A. True
B. False
Question No:45 (Marks:1) Vu-Topper RM
What can XML do?
A. The standard for automating data exchange between systems
B. The standard for displaying data on the Web
C. The standard for a cross-platform programming language

Question No:46 (Marks:1) Vu-Topper RM


Which is false?
A. XML is used to describe only structured data
B. XML is used to only on the Internet
C. XML is used to represent only simple data
D. All of the above

Question No:47 (Marks:1) Vu-Topper RM


Which of the following comments are not well formed?
A. <!-- define <source> -->
B. <!-- define <source> -->
C. <!-- declaration — 10.27.2004 -->
D. <!— this is a valid comment -->

Question No:48 (Marks:1) Vu-Topper RM


Which method does SAX use for processing XML documents?
a) Event Based
b) DocumentHandler
c) Document
d) Tree based

Question No:49 (Marks:1) Vu-Topper RM


Which method does DOM use for processing XML documents?
a) Event Based
b) DocumentHandler
c) Document
d) Tree based

Question No:50 (Marks:1) Vu-Topper RM


Which interfaces are part of the SAX2 API?
a) ContentHandler, ErrorHandler, DTDHandler, EntityResolver
b) DocumentHandler, ErrorHandler, DTDHandler, EntityHandler
c) DocumentHandler, Errorhandler, DTDHandler, SchemaHandler
d) DocumentHandler, Errorhandler, DTDHandler, EntityResolver
Question No:51 (Marks:1) Vu-Topper RM
Which is the best description of the “characters()” method?
a) a method of DOM API to insert character data in the XML document
b) a method of the SAX ContentHandler interface to receive
notification
of the presence of character data
c) a method of the DOM interface to replace the entity reference
with the character data
d) None of these.

Question No:52 (Marks:1) Vu-Topper RM


An XML document to be processed is very large. The application
extracts a small portion of the information from the document. Memory
and speed may be constraints. Which method or methods are most
appropriate for this situation?
a) Use SAX
b) Use DOM
c) Extract the necessary information and process using XSLT.
d) Use a schema-based approach.

Question No:53 (Marks:1) Vu-Topper RM


When you construct an XML using a DOM enabled Parser, the same
parser should be used to process back
the XML document when the process involves legacy applications,
otherwise it is not necessary to do so.
a) Not really
b) Yes, whenver the process is between legacy conectivity this is better.
c) You can use SAX enabled parser to fill this gap.
d) This statement is not a correct one, because DOM is constructed
using IDL.

Question No:54 (Marks:1) Vu-Topper RM


When Processing Instructions are a part of your parsing process, DOM
should be used,
since SAX cannot be used to detect a Processing Instruction in a
document.
a)true
b)false
Question No:55 (Marks:1) Vu-Topper RM
Consider a system which is memory & speed constraint. The
application is to process XML documents,
sort the contents and mail them to a higher configuration machine for
transformation. Which is the best approach?
a) Use platform native language to process the docuements
b) Use DOM based approach.
c) Using SAX based approach is the best.
d) DOM and SAX must be used in this context.

Question No:56 (Marks:1) Vu-Topper RM


When receiving documents from a non-trusted agent, the best way to
process the documents is:
a) Use SAX
b) Use DOM
c) Both can be used here.
d) Both can be used but validity is an issue here.

Question No:57 (Marks:1) Vu-Topper RM


In DOM, the Document interface is the only interface that allows you to
create other DOM document components.
a)true
b)false

Question No:58 (Marks:1) Vu-Topper RM


XSLT is essentially a tool for translating what kind of documents?
a) XML
b) PDF
c) DOM
d) RTF

Question No:59 (Marks:1) Vu-Topper RM


Use of SAX based parser is most likely to be used in which of the
following scenarios?
a) You want to process the document in a sequential order only.
b) The documents is very large.
c) When there is no need to validate XML documents.
d) The parser implements only SAX based approach.
Question No:60 (Marks:1) Vu-Topper RM
DOM can be used to process HTML documents.
a)true
b)false

Question No:61 (Marks:1) Vu-Topper RM


What error types does the SAX2 ErrorHandler interface handle?
a) informational, warning, fatal-error
b) warning, error, fatal-error
c) warning, error
d) informational, warning, error, fatal-error

Question No:62 (Marks:1) Vu-Topper RM


A DOM-based parser should be used for which of the following
situations?
a) Need to modify the XML document directly
b) Performance and/or memory is an issue
c) Need to have random access to the components of the XML
document
d) Only need to process the XML document sequentially

Vu-Topper RM

Vu-Topper RM
Vu-Topper RM

Vu-Topper RM

Vu-Topper RM

Vu-Topper RM
Vu-Topper RM

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy