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
Use Space or
to flip the card.
Question
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.
Question
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.
Question
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
Question
To get a DocumentBuilder object, first call the static ____ method of the DocumentBuilderFactory class.
A) newInstance B) document C) connection D) newDocument
Question
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.
Question
A ________ parser reports the building blocks of an XML document.
A) tree-based B) XPath C) streaming D) DOM
Question
To generate an object of a class that implements the Document interface, you need a __________.
A) DocumentGenerator B) DocumentBuilder C) DocumentValidator D) ObjectBuilder
Question
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.
Question
Which of the following attribute types describes any sequence of character in a DTD?
A) #REQUIRED B) #IMPLIED C) CDATA D) ATTLIST
Question
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.
Question
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
Question
A __________ parser builds a document tree.
A) streaming B) DOM C) DTD D) Document Model Object
Question
____________ is an extensible syntax that can be used to specify many different kinds of data.
A) DOM B) ELEMENT C) XHTML D) XML
Question
To read and analyze the contents of an XML document, you need an XML ____________.
A) parser B) document analyzer C) path D) tokenizer
Question
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
Question
The XML standard recommends that every XML document start with ____.
A) B) C) D)
Question
In XML, an attribute has a name and a(n) ____________________.
A) variable B) element C) value D) object
Question
Which of the following XML fragments contains an error?
A) half dollar B) C) D) quarter
Question
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.
Question
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
Question
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
Question
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.
Question
Which of the following represents the declaration of a DTD contained within the XML document?
A) B) C) D)
Question
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
Question
In XML, a DTD is introduced with the ___________ declaration.
A) FIXED B) REQUIRED C) IMPLIED D) DOCTYPE
Question
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.
Question
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
Question
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
Question
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
Question
How can a DTD specify that a course child element in a semester element is optional?
A) B) C) D)
Question
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
Question
What does DOM stand for?
A) Data Object Model B) Data Oriented Model C) Document Object Model D) Definition Object Model
Question
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
Question
In XML, ___________ refers to any sequence of character data and elements.
A) ASCII characters B) EBCIDC C) mixed elements D) mixed content
Question
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
Question
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
Question
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.
Question
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
Question
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.
Question
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.
Question
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.
Question
To insert text, you need the _________methods.
A) insertElement and setElement B) createNode and insertChild C) createTextNode and appendChild D) insertTextNode and insertChild
Question
You set element attributes with the _________method.
A) setElementAttributes B) setElement C) setAttributes D) setAttribute
Question
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>
Question
An element that is declared as _______ in a DTD may not have any children.
A) PCDATA B) ELEMENT C) NULL D) EMPTY
Question
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.
Question
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.
Question
The XML encoding for the ">" character is:
A) &gr; B) &greaterThan; C) > D) <
Question
What kind of object do you need to read an XML document?
A) DocumentBuilder B) newBuilder C) newInstance D) newDocumentBuilder
Question
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.
Question
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.
Question
To write a DOM document, you need to use an object that implements the _________ interface.
A) DocumentBuilder B) Serializable C) Serializer D) LSSerializer
Question
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.
Question
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.
Question
Where is the createElement method located?
A) DocumentBuilder class. B) newBuilder class. C) DocumentBuilder interface. D) Document interface.
Question
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.
Question
What kind of object do you need to create a new, empty XML document?
A) DocumentBuilder B) newBuilder C) newInstance D) newDocumentBuilder
Question
The package javax.xml.parsers contains:
A) Element and Text B) Document and DocumentBuilder C) DocumentBuilder and DocumentBuilderFactory D) Element and Document
Question
The XML encoding & is the replacement for the ____ character.
A) @ B) ! C) % D) &
Question
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
Question
The method setIgnoringElementContentWhitespace is in the _____ class:
A) DocumentDataDefinition B) DocumentFactory C) DocumentFactoryBuilder D) DocumentBuilderFactory
Question
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.
Question
For elements that contain text, the DTD rule is:
A) B) C) D)
Question
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.
Question
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
Question
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
Question
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"
Question
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"
Question
For price elements that must contain currency, the attribute list is:
A) B) C) D)
Question
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) ::= | |
Question
A number of useful advanced XML technologies have been standardized. Among them is:
A) HTML B) HXML C) XHTML D) W3C
Question
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"
Question
Which definition in an XML schema restricts the contents of quantity to an integer?
A) B) C) D)
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/74
Play
Full screen (f)
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
7
A ________ parser reports the building blocks of an XML document.
A) tree-based B) XPath C) streaming D) DOM
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
13
A __________ parser builds a document tree.
A) streaming B) DOM C) DTD D) Document Model Object
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
17
The XML standard recommends that every XML document start with ____.
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
18
In XML, an attribute has a name and a(n) ____________________.
A) variable B) element C) value D) object
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
19
Which of the following XML fragments contains an error?
A) half dollar B) C) D) quarter
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following represents the declaration of a DTD contained within the XML document?
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
26
In XML, a DTD is introduced with the ___________ declaration.
A) FIXED B) REQUIRED C) IMPLIED D) DOCTYPE
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
31
How can a DTD specify that a course child element in a semester element is optional?
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
44
You set element attributes with the _________method.
A) setElementAttributes B) setElement C) setAttributes D) setAttribute
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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>
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
49
The XML encoding for the ">" character is:
A) &gr; B) &greaterThan; C) > D) <
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
50
What kind of object do you need to read an XML document?
A) DocumentBuilder B) newBuilder C) newInstance D) newDocumentBuilder
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
56
Where is the createElement method located?
A) DocumentBuilder class. B) newBuilder class. C) DocumentBuilder interface. D) Document interface.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
60
The XML encoding & is the replacement for the ____ character.
A) @ B) ! C) % D) &
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
62
The method setIgnoringElementContentWhitespace is in the _____ class:
A) DocumentDataDefinition B) DocumentFactory C) DocumentFactoryBuilder D) DocumentBuilderFactory
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
64
For elements that contain text, the DTD rule is:
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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.
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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"
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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"
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
70
For price elements that must contain currency, the attribute list is:
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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) ::= | |
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
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"
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
74
Which definition in an XML schema restricts the contents of quantity to an integer?
A) B) C) D)
Unlock Deck
Unlock for access to all 74 flashcards in this deck.
Unlock Deck
k this deck
Unlock Deck
Unlock for access to all 74 flashcards in this deck.