Filters
Question type

Study Flashcards

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.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

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

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

Given the following code, what will the XPath /items/item[2]/quantity select? <items> <item> <product> <description>Ink Jet Refill Kit</description> <price>29.95</price> </product> <quantity>8</quantity> </item> <item> <product> <description>4-port Mini Hub</description> <price>19.95</price> </product> <quantity>4</quantity> </item> </items>


A) 19.95
B) 4
C) 8
D) The element does not exist.

E) A) and B)
F) All of the above

Correct Answer

verifed

verified

Given the following DTD expression, which section element is valid? <!ELEMENT section (title, (paragraph | (image, title?) ) +) >


A) <section>
<title/>
<paragraph/>
<image/>
<title/>
<paragraph/>
</section>
B) <section>
<paragraph/>
<paragraph/>
<title/>
</section>
C) <section>
<paragraph/>
<title/>
<title/>
<paragraph/>
</section>
D) <section>
<paragraph/>
<image/>
<title/>
<paragraph/>
</section>

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

The method setIgnoringElementContentWhitespace is in the _____ class:


A) DocumentDataDefinition
B) DocumentFactory
C) DocumentFactoryBuilder
D) DocumentBuilderFactory

E) All of the above
F) B) and D)

Correct Answer

verifed

verified

For elements that contain text, the DTD rule is:


A)
B)
C)
D)

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

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.

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

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.

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

The XML encoding & is the replacement for the ____ character.


A) @
B) !
C) %
D) &

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

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

E) C) and D)
F) A) and D)

Correct Answer

verifed

verified

In XML, ___________ refers to any sequence of character data and elements.


A) ASCII characters
B) EBCIDC
C) mixed elements
D) mixed content

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

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.

E) A) and D)
F) A) and C)

Correct Answer

verifed

verified

Where is the createElement method located?


A) DocumentBuilder class.
B) newBuilder class.
C) DocumentBuilder interface.
D) Document interface.

E) A) and B)
F) B) and D)

Correct Answer

verifed

verified

Given the following code, what will the XPath /items/item[0]/quantity select? <items> <item> <product> <description>Ink Jet Refill Kit</description> <price>29.95</price> </product> <quantity>8</quantity> </item> <item> <product> <description>4-port Mini Hub</description> <price>19.95</price> </product> <quantity>4</quantity> </item> </items>


A) 19.95
B) 4
C) 8
D) The element does not exist.

E) B) and D)
F) None of the above

Correct Answer

verifed

verified

Showing 61 - 74 of 74

Related Exams

Show Answer