Professional Documents
Culture Documents
Quiz - PRX301 - Tong Hop
Quiz - PRX301 - Tong Hop
3. For the XML parser to ignore a certain section of your XML document, which
syntax is correct?
a. <CDATA> Text to be ignored </CDATA>
b. <PCDATA> Text to be ignored </PCDATA>
c. <xml:CDATA[ Text to be ignored ]>
d. <![CDATA[ Text to be ignored ]]>
11. How do you find the number with the highest value of x and y?
a. ceil(x, y)
b. Math.max(x, y)
c. Math.ceil(x, y)
d. top(x, y)
13. What is the event name that fires when a user aborts page loading ?
a. onclick
b. onblur
c. onchange
d. onabort
14. Which Java provided XML parser parses the document by loading the complete
contents of the document and creating its complete hierarchical tree in memory?
a. SAX Parser
b. Stax Parser
c. DOM Parser
d. Xpath Parse
15. Which Java provided XML parser parses the document on event based triggers
and does not load the complete document into the memory?
a. SAX Parser
b. Stax Parser
c. DOM Parser
d. XPath Parser
19. Which Interface specifies the callback methods that the SAX parser uses to
notify an application program of the components of the XML document that it has
seen?
a. ContentHandler
b. TransformerHandler
c. SAXHandler
d. XMLReader
20. The method Document.importNode(Node importedNode, boolean deep)
imports a node from another document to current document. Which of the following is
false regarding this method?
a. The source node from the original document is not altered or removed
b. This method creates a new copy of the source node
c. DocumentType nodes can be imported.
d. Entity nodes can be imported
1. How do select all the og attributes in the document.
A. //@og
B. //og
C. /og
D. /@og
2. The property 'nextSbling in DOMDocument Object contains teh next
node ò the previous nodes in the parent's child list.
A. True
B. False
3. In XSLT you can declare.
A. No variables
B. Global variables only
C. Both local and global variables
D. Local variables only
4. Descendant having a new namespace cannot overried the namespace
defined bt the parent element?
A. False
B. True
5. The value a in the following statement is called the_______ and the
value b is called the_____face = Math.floor(a + Math.random()*b);
A. scaling value, shifting factor
B. shifting value, scaling factor
C. shifting factor, scaling value
D. scaling factor, shifting value
6. The values of an atribute of type ID is unique______
A. per document instance
B. per element type from a document instance
C. per schema instance
D. per data type from a schema instance
7. SAX parser has high memory consummation?
A. True
B. False
8. SAX makes sequence of call to handler function?
A. True
B. False
9. Method getElementByTagName return a node of list which will be
store.
A. DOMDocument object
B. XMLDOMNodeList object
C. XMLDOMNode object
D. XMLDOMNamedMap
10.Browser has the ability distinguish duplicate element names in an
XML
A. True
B. False
11.What is the significance of the following CSS rule?
LI,EM{color:red;font-weight:bolt;}
A. It will apply the specified style to text encolosed by either LI or EM
tags.
B. It will apply the specified style to text encolosed by the EM tags which
are within LI tags.
C. It will apply the specified style to text encolosed by the LI tags which
are within EM tags.
D. It will apply the specified style to text not encolosed by either LI or
EM
12. Is the following attribute definition valid?
<!ATTLIST TestXOR year CDATA #IMPLIED “2000”>
A. Yes
B. No
13.If the attibute minOccurs is specified but the attribute maxOccurs is
not, what is the default value of the latter?
A. minOccurs
B. unbounded
C. minOccurs + 1
D. this is error, if minOccurs is specified then maxOccurs must be
specified also.
14. Identifiers which have static duration___________
A. Are globally accessible to the scripts
B. Exits while the function in the which they are declared is still
active.
C. Exits while the function in the which they are declared is no longer
active
D. Are not automatically destroyed when the function in which they
are declared is exited.
15.The SAX parser reacts to a new element by using________12128
A. startDocumnent()
B. endElement()
C. characters()
D. startElement()
16.XML declaration is not required for XML document to be well-
formed.
A. True
B. False
17. Attribute standalone = “no” should be include in XML declaration if a
document:
A. Is linked to an external XSL stylesheet.
B. has external general references
C. has processinh instructions.
D. has an external DTD
18.In DTD, can you restrict the content of an XML attribute t take only
values from an enumeration list
A. Yes
B. No
19. Initializing a array direct invoolves using the_______control structure.
A. for loop
B. new
C. function
D. dynamic memory allocation aperator
20. Which of the following statements are true in the case of
A. XML describes its data along with its presentation.
B. XML was designed to describe data
C. Root element must be an empty tag
D. XML tags are predefined.
21.An empty file is a well-formed XML document.
A. True
B. False
22. In DOM, a node can have____________
A. More than one parent nodes
B. More than one children nodes
C. No sibling nodes
23.XML DOM defines a standard way for_________
A. only accessing the XML documents.
B. accessing and manipulating XML documents
C. only manipulating XML documents
24. The all collection is a property of the________object.
A. pText
B. HTML
C. BODY
D. Document
25.Does DOM parser allow random access to document?
A. True
B. False
26.Each XML document can be represented as a tree structure?
A. True
B. False
27. An attribute without a prefix is in default namespace?
A. True
B. Fale
28. How do you select all the lang attributes in the document?
A. /@lang
B. /lang
C. //lang
D. //@lang
29.Specifies that attibute cannot be used?
A. Prohibited
B. Required
C. Optional
D. Use
30.XSLT takes two things as input: an XSLT stylesheet and an XML
input document.
A. True
B. False
31.An XML Schema defines how many child element can appear in an
XML document?
A. True
B. False
32.Which of the following string are a correct XML name?
A. _myElement
B. my Element
C. #myElement
D. 2ndElement
33. Which is the correct CSS syntax?
A. body{color:balck}
B. {body;color:black}
C. body:color=black
D. {body:color=black(body}
34.In the following line, the word document is a____which resides in the
computer’s memory and contains information used by the scripts.
Document.writeln(“Hello Word”);
A. attibute
B. behavior
C. object
D. method
QN=1 Entities are used to avoid typing long pieces of text repeatedly within a document.
a. False
b. True
QN=2 If the DTD is included in your XML source file, it should be wrapped in a
DOCTYPE definition with the following syntax:
a. <DOCTYPE root-element [element-declarations]>
b. <DOCTYPE root-element (element-declarations)>
c. <!DOCTYPE root-element [element-declarations]>
d. <!DOCTYPE [element-declarations]>
QN=6 If the DTD is external to your XML source file, it should be wrapped in a
DOCTYPE definition with the following syntax:
a. <DOCTYPE root-element SYSTEM "filename">
b. <!DOCTYPE root-element SYSTEM 'filename'>
c. <!DOCTYPE root-element SYSTEM "filename">
d. <!DOCTYPE SYSTEM "filename">
QN=14 Which built-in method removes the last element from an array and
returns that element?
a. last()
b. get()
c. pop()
d. push()
QN=15 Which of the following function of Array object adds one or more
elements to the end of an array and returns the new length of the array?
a. push()
b. pop()
c. join()
d. map()
QN=16
<script type="text/javascript">
var a="GeeksforGeeks";
var x=a.lastIndexOf("G");
document.write(x);
</script>
a. 9
b. 8
c. 0
d. Error
QN=17 Which method does DOM use for processing XML documents?
a. Event Based
b. DocumentHandler
c. Document
d. Tree based
QN=18 Which of the following class of StAX parser specifies methods for
creating an event?
a. XMLEventWriter
b. ContentHandler
c. DocumentBuilder
d. XMLEventReader
QN=19 Which method of the following of StAX Parser can be used to retrieve
value and attributes of element?
a. StartElement asStartElement()
b. EndElement asEndElement()
c. Characters asCharacters()
d. Element()
QN=5 The values of Microsoft XML Schema Data Type “boolean” are :
a. True ,False or 1,0
b. True ,False
c. 1,0
d. any number other then zero and zero
QN=6 In XSL, the “block container” for formating the document is to create a ?
a. display block which formats the paragraphes
b. display block which formats the titles
c. display block which formats the figures and headlines
d. block level reference area
QN=7 In simple type built into XML schema type flat has single precision
of………..floating point
a. 64 bit
b. 32 bit
c. 16 bit
d. 8 bit
QN=13 With global and local variable, which of them takes precedence over
another one if they are the same name?
a. Global and local variable are always different name
b. None of them takes precedence over another one
c. Global variable
d. The local element
QN=14 Which one of the following is an ternary operator
a. *
b. /
c. ?
d. :
QN=17 Error types which the SAX2 ErrorHandler interface handle are :
a. warning, error, informational
b. warning, error, fatal-error
c. informational, warning, fatal-error
d. informational, warning, error, fatal-error
QN=18 The classes of StAX parser which specify methods to create an event is…
a. XMLInputFactory
b. XMLOutputFactory
c. XMLEventReader
d. XMLEventWriter
QN=19 Which of the following parses the XML based on expression and is used
extensively in conjuction with XSLT?
a. XPath Parser
b. JDOM Parser
c. SAX Parser
d. StAX Parser
QN=20 The method returns the root element of a document in DOM Parsing is…
a. Node.getFirstChild()
b. Node.getRoot()
c. Document.getDocumentElement()
d. Node.getLastChild()
QN=6 To create an empty element with optionally specify attributes type, but do
not permit content, we use the following syntax:
<xsd:element name="element - name ">
<xsd:simpleType>
<xsd:attribute name = “attribute - name” type = “attribute - type”>
</xsd: attribute >
</xsd:simpleType>
</xsd:element>
a. True
b. False
QN=7 The syntax for writing the minium occurrence for an element is
a. <xsd:element ref="student" minOccurs="1"/>
b. <xsd:element ref="student" minOccur="1"/>
c. <xsd:element ref="student" minOccurs="unbounded"/>
d. <xsd:element ref="student" minOccurs=1/>
a. ELEMENT
b. CDATA
c. PCDATA
d. DOCTYPE
QN=12 To match the specific XML elements in XSLT the syntax for given name
"rootnood " is
a. <xsl:template match="root">
b. <xsl:template match="rootnood">
c. <xsl:template match="//">
d. <xsl:template match="/">
QN=14 Which built-in method removes the first element from an array and
returns that element?
a. last()
b. shift()
c. pop()
d. push()
QN=15 Which of the following function of Array object adds one or more
elements to the first of an array and returns the new length of the array?
a. push()
b. pop()
c. join()
d. unshift()
<script language="javascript">
function x()
{
document.write(2+5+"8");
}
</script>
a. 258
b. Error
c. 7
d. 78
QN=17 Which method of the following of StAX Parser can be used to add start
element of given name?
a. writeEndElement(String localName)
b. writeAttribute(String localName, String value)
c. StartElement asStartElement()
d. writeStartElement(String localName)
QN=18 Which of the following method get called when document begin in SAX
parsing?
a. startDocument
b. endDocument
c. startElement
d. endElement
QN=19 Which of the following method returns the root element of the document
in DOM parsing?
a. Node.getRoot
b. Document.getDocumentElement
c. Node.getFirstChild
d. Node.getLastChild
QN=4 What is the correct syntax to declare elements with child elements
a. <!ELEMENT note (to; from; heading; body)>
b. <!ELEMENT note (to, from, heading, body)>
c. <!ELEMENT note [to; from; heading; body]>
d. <!ELEMENT note [to, from, heading, body]>
QN=7 Which XSL formating object is used to hold content of label of a list
item ?
a. list-bock
b. list item
c. list-item-body
d. list-item-label
QN=13 Which the following syntax is used to declare a constant type in Javascript
a. let
b. constant
c. var
d. const
QN=16 Cursor API and Event Iterator API are two categories of
a. DOM
b. StAX
c. SAX
d. SAXB
QN=18 The process used to convert an XML document nto an instance of a Java
class using an appropriate data binding framework or set of APIs is
a. Data binding
b. Marshaling
c. Class generation
d. Unmarshaling
QN=1 Which of the following are not correct rule of XML declaration?
a. The names are always in lower case.
b. The Parameter names and values are not case-sensitive
c. The correct order is: version, encoding and standalone.
QN=4 Entities are used to avoid typing long pieces of text repeatedly within a
document.
a. True
b. False
QN=5 Which of the follow types allows you to specify which child elements an
element can contain and to provide some structure within your XML
documents?
a. Simple type
b. Global Types
c. Complex Type
QN=15 What will happen if reverse() and join() methods are used simultaneously
a. Reverses and stores in the same array
b. Reverses and concatenates the elements of the array
c. Reverses
d. All of the mentioned
QN=16 The pop() method of the array does which of the following task?
a. decrements the total length by 1
b. increments the total length by 1
c. prints the first element but no effect on the length
d. None of the mentioned
QN=18 Which of the following method is used to read contents in SAX parsing?
a. characters()
b. endElement()
c. startElement()
d. startDocument()