Deck 23: XML

ملء الشاشة (f)
exit full mode
سؤال
The ____ standard defines interfaces and methods to analyze and modify the tree structure that represents an XML document.

A) JAXP
B) SAX
C) DOM
D) API
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Which of the following statements is correct?

A) XML is an extensible syntax that can be used to specify many different kinds of data.
B) XML has one specific purpose: to describe web documents.
C) XML tells you how to display data.
D) You can always replace XML elements with attributes.
سؤال
One of the advantages of XML is that _________.

A) it is resilient to change.
B) it is difficult to understand.
C) its values don't have to be enclosed in quotes.
D) array positions start with 1.
سؤال
An XPath describes a node or_______, using a syntax that is similar to directory paths.

A) folder
B) set of nodes
C) parser
D) model
سؤال
To get a DocumentBuilder object, first call the static ____ method of the DocumentBuilderFactory class.

A) newInstance
B) document
C) connection
D) newDocument
سؤال
Which of the following statements is correct?

A) XML-formatted data files are resilient to change.
B) In XML, start-tags need not have matching end-tags.
C) XML describes how to display data.
D) HTML is a special case of XML.
سؤال
A ________ parser reports the building blocks of an XML document.

A) tree-based
B) XPath
C) streaming
D) DOM
سؤال
To generate an object of a class that implements the Document interface, you need a __________.

A) DocumentGenerator
B) DocumentBuilder
C) DocumentValidator
D) ObjectBuilder
سؤال
Which of the following statements is correct?

A) Elements describe how to interpret attributes.
B) In XML, attribute values must be enclosed in quotes.
C) Mixed content allows you to have control over the order in which elements appear.
D) You should always use mixed content for elements that describe data sets.
سؤال
Which of the following attribute types describes any sequence of character in a DTD?

A) #REQUIRED
B) #IMPLIED
C) CDATA
D) ATTLIST
سؤال
Which of the following statements is correct?

A) In XML, every start-tag must have a matching end-tag.
B) XML files are readable by computer programs but not by humans.
C) Attribute values need not be enclosed in quotes.
D) An element cannot contain mixed content.
سؤال
Write an XML fragment with a course element and two child elements, courseID and credits. The course ID is CS605 and it has 3 credit hours.

A)
CS605
3

B)
CS605
3


C)
CS605
3

D)
CS605


3
سؤال
A __________ parser builds a document tree.

A) streaming
B) DOM
C) DTD
D) Document Model Object
سؤال
____________ is an extensible syntax that can be used to specify many different kinds of data.

A) DOM
B) ELEMENT
C) XHTML
D) XML
سؤال
To read and analyze the contents of an XML document, you need an XML ____________.

A) parser
B) document analyzer
C) path
D) tokenizer
سؤال
A ___________ is a program that reads a document, checks whether it is syntactically correct, and takes some action as it processes the document.

A) browser
B) compiler
C) document builder
D) parser
سؤال
The XML standard recommends that every XML document start with ____.

A)
B)
C)
D)
سؤال
In XML, an attribute has a name and a(n) ____________________.

A) variable
B) element
C) value
D) object
سؤال
Which of the following XML fragments contains an error?

A) half dollar
B)
C)
D) quarter
سؤال
Which of the following statements is correct?

A) Elements cannot have attributes.
B) An XML document starts out with an HTML declaration and contains elements and text.
C) An element must contain text or elements, not both.
D) An attribute is appropriate only if it tells something about the data but is not part of the data itself.
سؤال
Given the following code, what will the XPath count(/items/*) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
سؤال
Given the following code, what will the XPath name(/items/item[2]/*[2]) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) price
B) product
C) description
D) quantity
سؤال
Given the following code, what will the XPath /items/item[0]/quantity select?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 19.95
B) 4
C) 8
D) The element does not exist.
سؤال
Which of the following represents the declaration of a DTD contained within the XML document?

A)
B)
C)
D)
سؤال
Which parser gives you an overview of the complete document so you can analyze it?

A) grammar parser
B) tree-based parser
C) block parser
D) streaming parser
سؤال
In XML, a DTD is introduced with the ___________ declaration.

A) FIXED
B) REQUIRED
C) IMPLIED
D) DOCTYPE
سؤال
When converting an XML document to Java classes, how should you think about XML elements?

A) Elements are equivalent to classes.
B) Elements are like instance variables.
C) Elements are similar to superclasses.
D) Elements can be instance variables, classes, or methods.
سؤال
Given the following code, what will the XPath /items/item[2]/product/price generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 29.95
B) 19.95
C) 2
D) 4
سؤال
A _____________ reads and reports on each element of an XML document as it reads it.

A) DOM parser
B) tree-based parser
C) block parser
D) streaming parser
سؤال
Assuming that path is properly instantiated object of type XPath and doc is the document below, what is the value of result in the statement
String result = path.evaluate("count(/items/*", doc);



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
سؤال
How can a DTD specify that a course child element in a semester element is optional?

A)
B)
C)
D)
سؤال
When referencing an external DTD (one not on the current file system), you must supply a(n) ____ for locating the DTD.

A) URL
B) domain name
C) IP address
D) element
سؤال
What does DOM stand for?

A) Data Object Model
B) Data Oriented Model
C) Document Object Model
D) Definition Object Model
سؤال
A ____________ is a sequence of rules that describes the valid attributes for each element and the valid child elements for each element type.

A) DOM
B) Protocol
C) DTD
D) Data Definition Type
سؤال
In XML, ___________ refers to any sequence of character data and elements.

A) ASCII characters
B) EBCIDC
C) mixed elements
D) mixed content
سؤال
Given the following code, what will the XPath count(/items/item) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
سؤال
To make the parser ignore white space between elements, you should call the __________ method of the DocumentBuilderFactory class.

A) setIgnoringElementContentWhitespace
B) setElementContentWhitespace
C) setIgnoringContentWhitespace
D) setIgnoringElementContent
سؤال
Where is the newDocumentBuilder method?

A) In the DocumentBuilder class.
B) In the DocumentFactoryBuilder class.
C) In the DocumentFactory class.
D) In the DocumentBuilderFactory class.
سؤال
The inclusion of a DTD in an XML document allows you tell the parser to validate the document. The ___________ method of the DocumentBuilderFactory class allows you to turn on validation.

A) setValidator
B) setValidating
C) documentBuilder
D) setFactory
سؤال
Given the following code, what will the XPath /items/item[2]/quantity select?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 19.95
B) 4
C) 8
D) The element does not exist.
سؤال
An EMPTY element is:

A) an element that may have zero or more children.
B) an element that has no value.
C) an element whose value is the null string.
D) an element that may not have any children.
سؤال
In an attribute definition in a DTD, a #REQUIRED declaration means ____________.

A) the attribute is valid.
B) the attribute is required.
C) the attribute is optional.
D) the attribute is implied.
سؤال
To insert text, you need the _________methods.

A) insertElement and setElement
B) createNode and insertChild
C) createTextNode and appendChild
D) insertTextNode and insertChild
سؤال
You set element attributes with the _________method.

A) setElementAttributes
B) setElement
C) setAttributes
D) setAttribute
سؤال
Given the following DTD expression, which section element is valid?

A)

<br><paragraph/><br><image/><br><title/><br><paragraph/><br></section><br>B) <section><br><paragraph/><br><paragraph/><br><title/><br></section><br>C) <section><br><paragraph/><br><title/><br><title/><br><paragraph/><br></section><br>D) <section><br><paragraph/><br><image/><br><title/><br><paragraph/><br></section></div><div style="padding-top: 35px"></div>
سؤال
An element that is declared as _______ in a DTD may not have any children.

A) PCDATA
B) ELEMENT
C) NULL
D) EMPTY
سؤال
What method do you use to insert a node into an XML document?

A) insertNode method.
B) createNode method.
C) createElement method.
D) insertElement method.
سؤال
When referencing an external DTD (one not on the current file system), you must ____________.

A) supply a DOCTYPE.
B) supply a URL.
C) supply both DOCTYPE and URL.
D) use the SYSTEM reserved word.
سؤال
The XML encoding for the ">" character is:

A) &gr;
B) &greaterThan;
C) >
D) <
سؤال
What kind of object do you need to read an XML document?

A) DocumentBuilder
B) newBuilder
C) newInstance
D) newDocumentBuilder
سؤال
Mixed content is ____________.

A) any sequence of numeric data and character data.
B) any sequence of character data followed by character data.
C) any sequence of character data and specified elements.
D) any sequence of numeric data and specified elements.
سؤال
In an attribute definition in a DTD, an #IMPLIED declaration means ____________.

A) the attribute is valid.
B) the attribute is required.
C) the attribute is optional.
D) the attribute is implied.
سؤال
To write a DOM document, you need to use an object that implements the _________ interface.

A) DocumentBuilder
B) Serializable
C) Serializer
D) LSSerializer
سؤال
In an attribute definition in a DTD, a V declaration means ____________.

A) use the value V or a value that contains V.
B) use the value V if the attribute is unspecified.
C) use the value V if the attribute is optional.
D) use the value V if the attribute is required.
سؤال
The #PCDATA rule means ____________.

A) the children can consist of any numeric data.
B) the children can consist of 0 or more elements.
C) the children can consist of any character data.
D) any children allowed.
سؤال
Where is the createElement method located?

A) DocumentBuilder class.
B) newBuilder class.
C) DocumentBuilder interface.
D) Document interface.
سؤال
In an attribute definition in a DTD, a #FIXED V declaration means ____________.

A) the attribute must be either unspecified or contain V.
B) the attribute is unspecified.
C) the attribute is optional.
D) the attribute is required.
سؤال
What kind of object do you need to create a new, empty XML document?

A) DocumentBuilder
B) newBuilder
C) newInstance
D) newDocumentBuilder
سؤال
The package javax.xml.parsers contains:

A) Element and Text
B) Document and DocumentBuilder
C) DocumentBuilder and DocumentBuilderFactory
D) Element and Document
سؤال
The XML encoding & is the replacement for the ____ character.

A) @
B) !
C) %
D) &
سؤال
What package will you use to import Element?

A) javax.swing.Element
B) org.w3c.xml.Element
C) javax.parsers.Element
D) org.w3c.dom.Element
سؤال
The method setIgnoringElementContentWhitespace is in the _____ class:

A) DocumentDataDefinition
B) DocumentFactory
C) DocumentFactoryBuilder
D) DocumentBuilderFactory
سؤال
When you parse an XML file with a DTD, ____________.

A) you should tell the parser to ignore the white space.
B) you don't need to request validation.
C) you should supply URL for locating the DTD.
D) your should tell the parser to convert all white space to text.
سؤال
For elements that contain text, the DTD rule is:

A)
B)
C)
D)
سؤال
What is one reason to have the DOM parser ignore white space in an XML document?

A) White space may make the element names invalid.
B) The parser will otherwise make unneeded nodes of the white space.
C) The parser will otherwise add white space to the elements.
D) White space cannot be streamed.
سؤال
What package will you use to import Document?

A) javax.swing.Document
B) org.w3c.xml.Document
C) javax.parsers.Document
D) org.w3c.dom.Document
سؤال
What package will you use to import DocumentBuilder?

A) javax.swing.DocumentBuilder
B) javax.xml.DocumentBuilder
C) javax.parsers.DocumentBuilder
D) javax.xml.parsers.DocumentBuilder
سؤال
Using the grammar notation in your textbook, the expression ::= 0 | 1 | 2 means:

A) "digit must be equal to 012"
B) "digit can be replaced with 1 or 2"
C) "digit must start with 0 then 1 then 2"
D) "digit can be replaced with 0 or 1 or 2"
سؤال
Using the grammar notation in your textbook, the expression
::= a | the means:

A) "article must be equal to a and the"
B) "article can be replaced with a or the"
C) "article can be replaced with a and the"
D) "article cannot be equal a or the"
سؤال
For price elements that must contain currency, the attribute list is:

A)
B)
C)
D)
سؤال
Using the grammar notation in your textbook, which rule means that a verb can be either jumps over or eats?

A) ::= "jumps over" | "eats" |
B) ::= jumps over | eats
C) ::= jumps | over | eats
D) ::= | |
سؤال
A number of useful advanced XML technologies have been standardized. Among them is:

A) HTML
B) HXML
C) XHTML
D) W3C
سؤال
Using the grammar notation in your textbook, the expression
::= a means:

A) "article must be equal to a"
B) "article can be replaced with a or not a"
C) "article can be replaced with a"
D) "article cannot be equal to"
سؤال
Which definition in an XML schema restricts the contents of quantity to an integer?

A)
B)
C)
D)
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/74
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 23: XML
1
The ____ standard defines interfaces and methods to analyze and modify the tree structure that represents an XML document.

A) JAXP
B) SAX
C) DOM
D) API
C
2
Which of the following statements is correct?

A) XML is an extensible syntax that can be used to specify many different kinds of data.
B) XML has one specific purpose: to describe web documents.
C) XML tells you how to display data.
D) You can always replace XML elements with attributes.
A
3
One of the advantages of XML is that _________.

A) it is resilient to change.
B) it is difficult to understand.
C) its values don't have to be enclosed in quotes.
D) array positions start with 1.
A
4
An XPath describes a node or_______, using a syntax that is similar to directory paths.

A) folder
B) set of nodes
C) parser
D) model
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
5
To get a DocumentBuilder object, first call the static ____ method of the DocumentBuilderFactory class.

A) newInstance
B) document
C) connection
D) newDocument
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
6
Which of the following statements is correct?

A) XML-formatted data files are resilient to change.
B) In XML, start-tags need not have matching end-tags.
C) XML describes how to display data.
D) HTML is a special case of XML.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
7
A ________ parser reports the building blocks of an XML document.

A) tree-based
B) XPath
C) streaming
D) DOM
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
8
To generate an object of a class that implements the Document interface, you need a __________.

A) DocumentGenerator
B) DocumentBuilder
C) DocumentValidator
D) ObjectBuilder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which of the following statements is correct?

A) Elements describe how to interpret attributes.
B) In XML, attribute values must be enclosed in quotes.
C) Mixed content allows you to have control over the order in which elements appear.
D) You should always use mixed content for elements that describe data sets.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
10
Which of the following attribute types describes any sequence of character in a DTD?

A) #REQUIRED
B) #IMPLIED
C) CDATA
D) ATTLIST
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
11
Which of the following statements is correct?

A) In XML, every start-tag must have a matching end-tag.
B) XML files are readable by computer programs but not by humans.
C) Attribute values need not be enclosed in quotes.
D) An element cannot contain mixed content.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
12
Write an XML fragment with a course element and two child elements, courseID and credits. The course ID is CS605 and it has 3 credit hours.

A)
CS605
3

B)
CS605
3


C)
CS605
3

D)
CS605


3
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
13
A __________ parser builds a document tree.

A) streaming
B) DOM
C) DTD
D) Document Model Object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
14
____________ is an extensible syntax that can be used to specify many different kinds of data.

A) DOM
B) ELEMENT
C) XHTML
D) XML
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
15
To read and analyze the contents of an XML document, you need an XML ____________.

A) parser
B) document analyzer
C) path
D) tokenizer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
16
A ___________ is a program that reads a document, checks whether it is syntactically correct, and takes some action as it processes the document.

A) browser
B) compiler
C) document builder
D) parser
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
17
The XML standard recommends that every XML document start with ____.

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
18
In XML, an attribute has a name and a(n) ____________________.

A) variable
B) element
C) value
D) object
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
19
Which of the following XML fragments contains an error?

A) half dollar
B)
C)
D) quarter
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
20
Which of the following statements is correct?

A) Elements cannot have attributes.
B) An XML document starts out with an HTML declaration and contains elements and text.
C) An element must contain text or elements, not both.
D) An attribute is appropriate only if it tells something about the data but is not part of the data itself.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
21
Given the following code, what will the XPath count(/items/*) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
22
Given the following code, what will the XPath name(/items/item[2]/*[2]) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) price
B) product
C) description
D) quantity
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
23
Given the following code, what will the XPath /items/item[0]/quantity select?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 19.95
B) 4
C) 8
D) The element does not exist.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
24
Which of the following represents the declaration of a DTD contained within the XML document?

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
25
Which parser gives you an overview of the complete document so you can analyze it?

A) grammar parser
B) tree-based parser
C) block parser
D) streaming parser
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
26
In XML, a DTD is introduced with the ___________ declaration.

A) FIXED
B) REQUIRED
C) IMPLIED
D) DOCTYPE
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
27
When converting an XML document to Java classes, how should you think about XML elements?

A) Elements are equivalent to classes.
B) Elements are like instance variables.
C) Elements are similar to superclasses.
D) Elements can be instance variables, classes, or methods.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
28
Given the following code, what will the XPath /items/item[2]/product/price generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 29.95
B) 19.95
C) 2
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
29
A _____________ reads and reports on each element of an XML document as it reads it.

A) DOM parser
B) tree-based parser
C) block parser
D) streaming parser
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
30
Assuming that path is properly instantiated object of type XPath and doc is the document below, what is the value of result in the statement
String result = path.evaluate("count(/items/*", doc);



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
31
How can a DTD specify that a course child element in a semester element is optional?

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
32
When referencing an external DTD (one not on the current file system), you must supply a(n) ____ for locating the DTD.

A) URL
B) domain name
C) IP address
D) element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
33
What does DOM stand for?

A) Data Object Model
B) Data Oriented Model
C) Document Object Model
D) Definition Object Model
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
34
A ____________ is a sequence of rules that describes the valid attributes for each element and the valid child elements for each element type.

A) DOM
B) Protocol
C) DTD
D) Data Definition Type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
35
In XML, ___________ refers to any sequence of character data and elements.

A) ASCII characters
B) EBCIDC
C) mixed elements
D) mixed content
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
36
Given the following code, what will the XPath count(/items/item) generate?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 1
B) 2
C) 3
D) 4
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
37
To make the parser ignore white space between elements, you should call the __________ method of the DocumentBuilderFactory class.

A) setIgnoringElementContentWhitespace
B) setElementContentWhitespace
C) setIgnoringContentWhitespace
D) setIgnoringElementContent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
38
Where is the newDocumentBuilder method?

A) In the DocumentBuilder class.
B) In the DocumentFactoryBuilder class.
C) In the DocumentFactory class.
D) In the DocumentBuilderFactory class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
39
The inclusion of a DTD in an XML document allows you tell the parser to validate the document. The ___________ method of the DocumentBuilderFactory class allows you to turn on validation.

A) setValidator
B) setValidating
C) documentBuilder
D) setFactory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
40
Given the following code, what will the XPath /items/item[2]/quantity select?



Ink Jet Refill Kit
29.95

8



4-port Mini Hub
19.95

4


A) 19.95
B) 4
C) 8
D) The element does not exist.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
41
An EMPTY element is:

A) an element that may have zero or more children.
B) an element that has no value.
C) an element whose value is the null string.
D) an element that may not have any children.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
42
In an attribute definition in a DTD, a #REQUIRED declaration means ____________.

A) the attribute is valid.
B) the attribute is required.
C) the attribute is optional.
D) the attribute is implied.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
43
To insert text, you need the _________methods.

A) insertElement and setElement
B) createNode and insertChild
C) createTextNode and appendChild
D) insertTextNode and insertChild
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
44
You set element attributes with the _________method.

A) setElementAttributes
B) setElement
C) setAttributes
D) setAttribute
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
45
Given the following DTD expression, which section element is valid?

A)

<br><paragraph/><br><image/><br><title/><br><paragraph/><br></section><br>B) <section><br><paragraph/><br><paragraph/><br><title/><br></section><br>C) <section><br><paragraph/><br><title/><br><title/><br><paragraph/><br></section><br>D) <section><br><paragraph/><br><image/><br><title/><br><paragraph/><br></section></div>
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
46
An element that is declared as _______ in a DTD may not have any children.

A) PCDATA
B) ELEMENT
C) NULL
D) EMPTY
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
47
What method do you use to insert a node into an XML document?

A) insertNode method.
B) createNode method.
C) createElement method.
D) insertElement method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
48
When referencing an external DTD (one not on the current file system), you must ____________.

A) supply a DOCTYPE.
B) supply a URL.
C) supply both DOCTYPE and URL.
D) use the SYSTEM reserved word.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
49
The XML encoding for the ">" character is:

A) &gr;
B) &greaterThan;
C) >
D) <
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
50
What kind of object do you need to read an XML document?

A) DocumentBuilder
B) newBuilder
C) newInstance
D) newDocumentBuilder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
51
Mixed content is ____________.

A) any sequence of numeric data and character data.
B) any sequence of character data followed by character data.
C) any sequence of character data and specified elements.
D) any sequence of numeric data and specified elements.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
52
In an attribute definition in a DTD, an #IMPLIED declaration means ____________.

A) the attribute is valid.
B) the attribute is required.
C) the attribute is optional.
D) the attribute is implied.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
53
To write a DOM document, you need to use an object that implements the _________ interface.

A) DocumentBuilder
B) Serializable
C) Serializer
D) LSSerializer
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
54
In an attribute definition in a DTD, a V declaration means ____________.

A) use the value V or a value that contains V.
B) use the value V if the attribute is unspecified.
C) use the value V if the attribute is optional.
D) use the value V if the attribute is required.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
55
The #PCDATA rule means ____________.

A) the children can consist of any numeric data.
B) the children can consist of 0 or more elements.
C) the children can consist of any character data.
D) any children allowed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
56
Where is the createElement method located?

A) DocumentBuilder class.
B) newBuilder class.
C) DocumentBuilder interface.
D) Document interface.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
57
In an attribute definition in a DTD, a #FIXED V declaration means ____________.

A) the attribute must be either unspecified or contain V.
B) the attribute is unspecified.
C) the attribute is optional.
D) the attribute is required.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
58
What kind of object do you need to create a new, empty XML document?

A) DocumentBuilder
B) newBuilder
C) newInstance
D) newDocumentBuilder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
59
The package javax.xml.parsers contains:

A) Element and Text
B) Document and DocumentBuilder
C) DocumentBuilder and DocumentBuilderFactory
D) Element and Document
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
60
The XML encoding & is the replacement for the ____ character.

A) @
B) !
C) %
D) &
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
61
What package will you use to import Element?

A) javax.swing.Element
B) org.w3c.xml.Element
C) javax.parsers.Element
D) org.w3c.dom.Element
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
62
The method setIgnoringElementContentWhitespace is in the _____ class:

A) DocumentDataDefinition
B) DocumentFactory
C) DocumentFactoryBuilder
D) DocumentBuilderFactory
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
63
When you parse an XML file with a DTD, ____________.

A) you should tell the parser to ignore the white space.
B) you don't need to request validation.
C) you should supply URL for locating the DTD.
D) your should tell the parser to convert all white space to text.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
64
For elements that contain text, the DTD rule is:

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
65
What is one reason to have the DOM parser ignore white space in an XML document?

A) White space may make the element names invalid.
B) The parser will otherwise make unneeded nodes of the white space.
C) The parser will otherwise add white space to the elements.
D) White space cannot be streamed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
66
What package will you use to import Document?

A) javax.swing.Document
B) org.w3c.xml.Document
C) javax.parsers.Document
D) org.w3c.dom.Document
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
67
What package will you use to import DocumentBuilder?

A) javax.swing.DocumentBuilder
B) javax.xml.DocumentBuilder
C) javax.parsers.DocumentBuilder
D) javax.xml.parsers.DocumentBuilder
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
68
Using the grammar notation in your textbook, the expression ::= 0 | 1 | 2 means:

A) "digit must be equal to 012"
B) "digit can be replaced with 1 or 2"
C) "digit must start with 0 then 1 then 2"
D) "digit can be replaced with 0 or 1 or 2"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
69
Using the grammar notation in your textbook, the expression
::= a | the means:

A) "article must be equal to a and the"
B) "article can be replaced with a or the"
C) "article can be replaced with a and the"
D) "article cannot be equal a or the"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
70
For price elements that must contain currency, the attribute list is:

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
71
Using the grammar notation in your textbook, which rule means that a verb can be either jumps over or eats?

A) ::= "jumps over" | "eats" |
B) ::= jumps over | eats
C) ::= jumps | over | eats
D) ::= | |
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
72
A number of useful advanced XML technologies have been standardized. Among them is:

A) HTML
B) HXML
C) XHTML
D) W3C
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
73
Using the grammar notation in your textbook, the expression
::= a means:

A) "article must be equal to a"
B) "article can be replaced with a or not a"
C) "article can be replaced with a"
D) "article cannot be equal to"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
74
Which definition in an XML schema restricts the contents of quantity to an integer?

A)
B)
C)
D)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 74 في هذه المجموعة.