Deck 19: Xml and Linq to Xml

Full screen (f)
exit full mode
Question
XML stands for Extensible Markup Language
Use Space or
up arrow
down arrow
to flip the card.
Question
Unlike with Visual Basic programs,blank lines and indentation cannot be used to improve readability in XML.
Question
The XML recommendation was developed by __________.

A)Microsoft
B)Sun MicroSystems
C)World Wide Web Consortium
D)Oracle
Question
XML documents __________.

A)are highly portable
B)are not portable
C)are portable depending on how the document is written
D)are a burden to use
Question
A validating parser only determines if the document is well formed.
Question
XML enables the description of only data stored in databases.
Question
Every XML document must contain exactly one root element.
Question
XML documents are readable only by computers and require translation in order to be human readable.
Question
Using XML,authors can describe any type of data,including

A)music
B)mathematical formulas
C)software-configuration instructions
D)All of the above
Question
All XML files have to end in the .xml extension
Question
Choose the correct XML syntax:

A)hello
B)hello

C)hello
D)hello
Question
XML is a proprietary technology.
Question
Which of the following about the XML prolog is true?

A)The XML prolog consists of the lines that precede the root element.
B)The XML declaration must appear before comments and any other markup.
C)The XML prolog is limited to a certain number of lines.
D)a and b.
Question
The XML declaration is mandatory.
Question
XML comments begin with:

A)B)
Question
Which of the following cannot be part of an element's name?

A)quotation marks
B)hyphens
C)underscores
D)periods
Question
XML is most commonly used to:

A)communicate with wireless devices
B)store and format data for exchange between apps
C)display information on the Internet
D)validate HTML files.
Question
An XML document can optionally reference a DTD or schema that defines the proper structure of the document.
Question
XML is case sensitive.
Question
The proper way to make start and end tags is:

A)
B) <\name>
C)<\name>
D)
Question
The EMPTY keyword specifies that the element does not contain any data between its start and end tag.
Question
XML _____________ provide a means of uniquely identifying XML elements.

A)attributes
B)tags
C)namespaces
D)None of the above
Question
In the code: <deitel:name>,name is the namespace and deitel is the element name.
Question
When using a namespace the prefix must always be included.
Question
Keyword ________ indicates that an element contains parseable character data.

A)PARSEDATA
B)CHARDATA
C)CDATA
D)PCDATA
Question
If the URI given to a namespace is a URL,the URL needs to refer to an actual web page and must conform to proper URL syntax.
Question
DTDs are used to ________.

A)describe the structure of an XML document
B)enable an XML parser to verify whether an XML document is valid
C)verify whether an XML document's elements contain the proper attributes and appear in the proper sequence
D)All of the above.
Question
XML-based languages are called vocabularies.
Question
An XML element can have only one attribute in its start tag.
Question
To eliminate the need to precede each element with a namespace prefix,document authors can specify a xe "default namespace"default namespace.
Question
XML elements are nested to form hierarchies.
Question
Individual units of markup are called tags.
Question
The asterisk (*)after an element in a DTD means that:

A)there are many occurrences of that item.
B)there could be any number of occurrences of that item.
C)that item could appear but at most once.
D)All of the above
Question
The question mark (?)after an element in a DTD means that:

A)there are many occurrences of that item.
B)there could be any number of occurrences of that item.
C)that item can appear at most once.
D)All of the above
Question
DTDs and schemas are used to specify the structure of XML documents.
Question
XML does not allow for empty elements.
Question
In order to ensure a unique XML namespace you should use:

A)your Social Security Number
B)your address
C)an appropriate web URL
D)your last name
Question
DTD is an acronym for ________.

A)Document Type Dictionary
B)Data Translator Definition
C)Document Type Definition
D)Document Translator Definition
Question
To define attributes in a DTD,the ATTRIBUTE keyword is used.
Question
Document authors can create a namespace prefix named xml.
Question
Parsed character data can contain markup.
Question
Extensible Stylesheet Language (XSL)is an XML vocabulary made specifically for formatting XHTML data
Question
After a transformation,the source tree is altered.
Question
Which of the following is not a technology of XSL?

A)XSL-FO: vocabulary for specifying formatting
B)XPath: string-based language of expressions used by XML
C)XSLT: transforms XML documents into other documents
D)XLib: library to help develop new stylesheets
Question
XSL documents specify how programs are to render XML document data
Question
A xe "processing instruction"processing instruction (PI)contains app-specific information that is embedded into the XML document.
Question
Complex types with simple content must extend or restrict some other existing types.Complex types with complex content do not have this limitation.
Question
XML documents can reference optional documents that define how the XML documents should be structured.
Question
Limitations of schemas have led to the development of DTD's.
Question
XSL style sheets cannot be connected directly to an XML document.
Question
Flag xe "#PCDATA flag"#PCDATA specifies that an element can store xe "parsed character data"parsed character data.
Question
Schemas normally use the ______ extension.

A))shm
B))sch
C))xsd
D))schema
Question
The transformation process,where formatted text-based documents are created from XML documents,involves ________.

A)0 trees
B)1 tree;the source.
C)2 trees;the source and the result tree.
D)3 trees;the source,the result,and the temp tree.
Question
A DOM tree is a data structure that ________.

A)Does Operations Manually.
B)holds 1 XML document per node,creating a multi-page site.
C)breaks XML documents down into chunks.
D)holds all the elements of an XML document within its nodes.
Question
Classes for creating,reading and manipulating XML documents are located in namespace ________.

A)System.Xml
B)System.Xml.Linq
C)Microsoft.Xml
D)a and b
Question
XDocument objects contain other nested XDocuments.
Question
Schemas are XML documents that conform to a DTD.
Question
The hierarchical tree structure stored in memory by the XML parser is called the ________.

A)Document Type Definition (DTD)
B)Simple Object Access Protocol (SOAP)
C)Active Server Page (ASP)
D)Document Object Model (DOM)
Question
The schema specifies the type of data that elements and attributes may contain.
Question
A DTD describes the contents of an XML document's elements.
Question
Axis properties are similar to ________.

A)XElement objects
B)XPaths
C)XML documents
D)TreeNode structures
Question
XslCompiledTransform's ________ method applies the style sheet to a specified XML document.

A)Compile
B)Load
C)Transform
D)None of the above.
Question
The collection returned by an axis property must be converted to an IEnumerable collection before being used by a LINQ query.
Question
The attribute axis is used to add,modify and return attribute values.
Question
There is an XSLT processor included in Internet Explorer to help perform transformations.
Question
An XML literal such as can be used in place of an XElement object.
Question
The descendant axis differs from the child axis in that the descendant axis returns matches from all descendants,and the child axis returns matches from direct children only.
Question
Embedded expressions allow ________ to be inserted in XML literals.

A)Visual Basic code expressions
B)other XML literals
C)hyperlinks
D)attached elements
Question
An XElement's contained text is retrieved with the Value property.
Question
XslCompiledTransform's Load method parses and loads a style sheet.
Question
The child axis returns XElements from the set of nodes which are _______ the current node.

A)lower in the hierarchy than
B)direct children of
C)Both (a)and (b).
D)None of the above.
Question
Which namespace contains the XslCompiledTransform?

A)System.Xml.Xsl
B)System.Xsl
C)System.Xml.Transform
D)System.XmlTransform
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/72
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 19: Xml and Linq to Xml
1
XML stands for Extensible Markup Language
True
2
Unlike with Visual Basic programs,blank lines and indentation cannot be used to improve readability in XML.
False
3
The XML recommendation was developed by __________.

A)Microsoft
B)Sun MicroSystems
C)World Wide Web Consortium
D)Oracle
C
4
XML documents __________.

A)are highly portable
B)are not portable
C)are portable depending on how the document is written
D)are a burden to use
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
5
A validating parser only determines if the document is well formed.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
6
XML enables the description of only data stored in databases.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
7
Every XML document must contain exactly one root element.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
8
XML documents are readable only by computers and require translation in order to be human readable.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
9
Using XML,authors can describe any type of data,including

A)music
B)mathematical formulas
C)software-configuration instructions
D)All of the above
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
10
All XML files have to end in the .xml extension
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
11
Choose the correct XML syntax:

A)hello
B)hello

C)hello
D)hello
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
12
XML is a proprietary technology.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
13
Which of the following about the XML prolog is true?

A)The XML prolog consists of the lines that precede the root element.
B)The XML declaration must appear before comments and any other markup.
C)The XML prolog is limited to a certain number of lines.
D)a and b.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
14
The XML declaration is mandatory.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
15
XML comments begin with:

A)B)
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
16
Which of the following cannot be part of an element's name?

A)quotation marks
B)hyphens
C)underscores
D)periods
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
17
XML is most commonly used to:

A)communicate with wireless devices
B)store and format data for exchange between apps
C)display information on the Internet
D)validate HTML files.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
18
An XML document can optionally reference a DTD or schema that defines the proper structure of the document.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
19
XML is case sensitive.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
20
The proper way to make start and end tags is:

A)
B) <\name>
C)<\name>
D)
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
21
The EMPTY keyword specifies that the element does not contain any data between its start and end tag.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
22
XML _____________ provide a means of uniquely identifying XML elements.

A)attributes
B)tags
C)namespaces
D)None of the above
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
23
In the code: <deitel:name>,name is the namespace and deitel is the element name.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
24
When using a namespace the prefix must always be included.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
25
Keyword ________ indicates that an element contains parseable character data.

A)PARSEDATA
B)CHARDATA
C)CDATA
D)PCDATA
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
26
If the URI given to a namespace is a URL,the URL needs to refer to an actual web page and must conform to proper URL syntax.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
27
DTDs are used to ________.

A)describe the structure of an XML document
B)enable an XML parser to verify whether an XML document is valid
C)verify whether an XML document's elements contain the proper attributes and appear in the proper sequence
D)All of the above.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
28
XML-based languages are called vocabularies.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
29
An XML element can have only one attribute in its start tag.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
30
To eliminate the need to precede each element with a namespace prefix,document authors can specify a xe "default namespace"default namespace.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
31
XML elements are nested to form hierarchies.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
32
Individual units of markup are called tags.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
33
The asterisk (*)after an element in a DTD means that:

A)there are many occurrences of that item.
B)there could be any number of occurrences of that item.
C)that item could appear but at most once.
D)All of the above
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
34
The question mark (?)after an element in a DTD means that:

A)there are many occurrences of that item.
B)there could be any number of occurrences of that item.
C)that item can appear at most once.
D)All of the above
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
35
DTDs and schemas are used to specify the structure of XML documents.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
36
XML does not allow for empty elements.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
37
In order to ensure a unique XML namespace you should use:

A)your Social Security Number
B)your address
C)an appropriate web URL
D)your last name
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
38
DTD is an acronym for ________.

A)Document Type Dictionary
B)Data Translator Definition
C)Document Type Definition
D)Document Translator Definition
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
39
To define attributes in a DTD,the ATTRIBUTE keyword is used.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
40
Document authors can create a namespace prefix named xml.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
41
Parsed character data can contain markup.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
42
Extensible Stylesheet Language (XSL)is an XML vocabulary made specifically for formatting XHTML data
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
43
After a transformation,the source tree is altered.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
44
Which of the following is not a technology of XSL?

A)XSL-FO: vocabulary for specifying formatting
B)XPath: string-based language of expressions used by XML
C)XSLT: transforms XML documents into other documents
D)XLib: library to help develop new stylesheets
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
45
XSL documents specify how programs are to render XML document data
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
46
A xe "processing instruction"processing instruction (PI)contains app-specific information that is embedded into the XML document.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
47
Complex types with simple content must extend or restrict some other existing types.Complex types with complex content do not have this limitation.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
48
XML documents can reference optional documents that define how the XML documents should be structured.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
49
Limitations of schemas have led to the development of DTD's.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
50
XSL style sheets cannot be connected directly to an XML document.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
51
Flag xe "#PCDATA flag"#PCDATA specifies that an element can store xe "parsed character data"parsed character data.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
52
Schemas normally use the ______ extension.

A))shm
B))sch
C))xsd
D))schema
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
53
The transformation process,where formatted text-based documents are created from XML documents,involves ________.

A)0 trees
B)1 tree;the source.
C)2 trees;the source and the result tree.
D)3 trees;the source,the result,and the temp tree.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
54
A DOM tree is a data structure that ________.

A)Does Operations Manually.
B)holds 1 XML document per node,creating a multi-page site.
C)breaks XML documents down into chunks.
D)holds all the elements of an XML document within its nodes.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
55
Classes for creating,reading and manipulating XML documents are located in namespace ________.

A)System.Xml
B)System.Xml.Linq
C)Microsoft.Xml
D)a and b
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
56
XDocument objects contain other nested XDocuments.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
57
Schemas are XML documents that conform to a DTD.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
58
The hierarchical tree structure stored in memory by the XML parser is called the ________.

A)Document Type Definition (DTD)
B)Simple Object Access Protocol (SOAP)
C)Active Server Page (ASP)
D)Document Object Model (DOM)
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
59
The schema specifies the type of data that elements and attributes may contain.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
60
A DTD describes the contents of an XML document's elements.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
61
Axis properties are similar to ________.

A)XElement objects
B)XPaths
C)XML documents
D)TreeNode structures
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
62
XslCompiledTransform's ________ method applies the style sheet to a specified XML document.

A)Compile
B)Load
C)Transform
D)None of the above.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
63
The collection returned by an axis property must be converted to an IEnumerable collection before being used by a LINQ query.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
64
The attribute axis is used to add,modify and return attribute values.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
65
There is an XSLT processor included in Internet Explorer to help perform transformations.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
66
An XML literal such as can be used in place of an XElement object.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
67
The descendant axis differs from the child axis in that the descendant axis returns matches from all descendants,and the child axis returns matches from direct children only.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
68
Embedded expressions allow ________ to be inserted in XML literals.

A)Visual Basic code expressions
B)other XML literals
C)hyperlinks
D)attached elements
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
69
An XElement's contained text is retrieved with the Value property.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
70
XslCompiledTransform's Load method parses and loads a style sheet.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
71
The child axis returns XElements from the set of nodes which are _______ the current node.

A)lower in the hierarchy than
B)direct children of
C)Both (a)and (b).
D)None of the above.
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
72
Which namespace contains the XslCompiledTransform?

A)System.Xml.Xsl
B)System.Xsl
C)System.Xml.Transform
D)System.XmlTransform
Unlock Deck
Unlock for access to all 72 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 72 flashcards in this deck.