Section 1: Introduction Flashcards

Introduction (107 cards)

1
Q

What does stand XML for?

A

eXtensible Markup Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is XML?

A

A software and hardware independent tool for storing and transporting data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTML

A

Designed to display data, focuses on how data looks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

XML was designed to…

A

carry data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

XML Tags

A

A set of markers (< , >) that are applied to a data set or document to describe the function of individual elements and codify the hierarchical relationships between them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

XML tags are predefined. True or false?

A

False, author must invent/define the tags.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

XML simplifies:

A

data sharing, data transport, platform changes, and data availability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

XML stores data in plain text format which provides software and hardware independent way of storing, transporting, and sharing data. True or false?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

XML data ___ be stored in separate XML files.

A

can

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

XML Tree

A

XML documents form a tree structure that starts at the “root” element and branches to the “leaves” or child elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

All elements must contain…

A

content and attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Attributes

A

Designed to contain data related to a specific element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Can elements have sub/child elements?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Prolog

A

If included, it is the first line of an XML document that defines the XML version and the character encoding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

XML documents must contain one ___ that is the parent of all other elements.

A

one root element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Element

A

Everything from (including) the element’s start tag to (including) the element’s end tag that may contain text, attributes, other elements, or entity references.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Entity Refereneces

A

A group of characters used in text as a substitute for a single specific character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the default character encoding for XML documents?

A

UTF-8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

UTF-8

A

A universal, variable-length character encoding (1 to 4 bytes long) set that defines all the characters needed for writing the majority of living languages in use on computers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Does the prolog require a closing tag?

A

No, it is not considered a part of the XML document.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

XML documents cannot contain internationals characters. True or false?

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

It is illegal to omit the closing tag in XML. True or false?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What would the tags of an element named message look like?

A

<message>This is correct</message>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Opening and closing tags also referred to as…

A

Start and End tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
All elements must be properly ___ with each other.
nested
26
Pre-Defined Entity References
< > & ' "
27
<
( < ) less than symbol
28
>
( > ) greater than symbol
29
&
( & ) ampersand symbol
30
'
( ' ) apostrophe
31
"
( " ) quotation mark
32
The parser interprets "<" as the start of a...
new element
33
Comment Syntax
34
XML does not remove multiple white spaces. True or false?
True
35
XML stores a new line as...
line feed (LF)
36
Line Feed (LF)
A control character used in computing and communications to indicate the end of a line of text and the start of a new line.
37
An XML element can contain:
text, attributes, other elements, mix of all
38
Empty XML Element
Does not contain content.
39
Empty elements cannot have attributes. True or false?
False, empty elements can have attributes.
40
Element Naming Rules
Names are case-sensitive, must start with a letter or underscore, cannot start with the letters XML, cannot contain spaces, and can contain letters, digits, underscores, and periods.
41
What is the correct syntax of the declaration which defines the XML version?
42
Why should you avoid "-" if you name something "first-name"?
Some software may interpret it as "name" being subtracted from "first".
43
Why should you avoid "." if you name something "first.name"?
Some software may interpret "name" as a property of the object "first".
44
Why should colons be avoided in naming elements?
Colons are reserved for namespaces.
45
Commonly used naming conventions for XML elements:
lower case, upper case, snake case (underscore separates words), pascal case (upper case letter for each word), and camel case (upper case letter for each word except first).
46
XML documents often have a corresponding ___ and it is common to use the naming rules of it for the XML document..
database
47
Attribute values must always be quoted using...
single or double quotes
48
If an attribute value itself contains double quotes, you can use ___ .
single quotes or character entities
49
What needs to be considered when using attributes?
Attributes cannot contain multiple values or tree structures and are not easily expandable (for future changes).
50
Elements can contain multiple values and tree structures. True or false?
True
51
Is <1dollar> a correct name for an XML element?
No, starts with a number.
52
What is an XML instance?
An XML document.
53
XML Namespaces
A collection of names that can be used as element or attribute names in an XML document.
54
XML Namespace Declaration Syntax
xmlns:prefix="URI", xmlns is a reserved word that is used only to declare a namespace
55
When a namespace is defined for an element, all child elements with the same prefix are not associated with the same namespace. True or false?
False, all child element with the same prefix are associated with the same namespace.
56
Namespace can be declared in the XML ___.
root element
57
Uniform Resource Identifier (URL)
A string of characters which identifies an Internet Resource.
58
Uniform Resource Locator (URL)
Identifies an Internet domain address.
59
What is the most common URI?
URL
60
Extensible Stylesheet Language Transformations (XSLT)
A language that can be used to transform XML documents into other formats.
61
Defining a default ___for an element saves us from using prefixes in all the child elements.
namespace
62
Default Namespace Syntax
xmlns="namespaceURI"
63
To view raw XML source, try to select ___ or ___ from the browser menu.
"View Page Source", "View Source"
64
XML HttpRequest Object can be used to:
Update a web page without reloading the page Request or receive data from a server - after the page has loaded Send data to a server - in the background
65
XML Parser
A software component that takes input data (usually text) and analyzes it according to a set of rules (grammar) to build a structured representation of the data, essentially breaking down the input into its constituent parts while checking if the syntax is correct.
66
XML DOM (Document Object Model)
Defines a standard way for accessing and manipulating XML documents.
67
Before an XML document can be accessed it must be loaded into an ___.
XML DOM object
68
All XML elements can be accessed through the XML DOM. True or false?
True
69
XPath
A syntax for defining parts of an XML document, contains a library of standard functions.
70
What is a correct way of referring to a stylesheet called "mystyle.xsl" ?
71
What XML DOM object represents a node in the node tree?
The node object.
72
Attributes must occur in defined order. True or false?
False
73
For the XML parser to ignore a certain section of your XML document, how could it be written?
74
XPath Expression
A simple language within XML that allows users to select specific elements and attributes from a document by identifying pathways through the XML structure.
75
Extensible Stylesheet Language Transformation (XSLT)
Used to transform XML documents into XHTML documents, or into other XML documents using XPath.
76
XQuery
A language for finding and extracting elements and attributes from XML documents that is built on XPath expressions.
77
XQuery can be used to:
Extract information to use in a Web Service Generate summary reports Transform XML data to XHTML Search Web documents for relevant information
78
XLink
Used to create hyperlinks within XML documents.
79
With XLink, the links can be defined outside the linked files. True of false?
True
80
XLink Syntax
xlink:href
81
To get access to the XLink features we must...
declare the XLink namespace
82
xlink:actuate
Defines when the linked resource is read and shown.
83
onLoad
Values of xlink:actuate where the resource should be loaded and shown when the document loads.
84
onRequest
Values of xlink:actuate where the resource is not read or shown before the link is clicked.
85
xlink:show
Specifies where to open the link. Default value is "replace".
86
xlink:show value options
embed, new, replace, other, none
87
xlink:actuate value options
onLoad, onRequest, other, none
88
xlink:type
Specifies the type of link.
89
xlink:type value options
simple, extended, locator, arc, resource, title, or none.
90
XPointer
Allows links to point to specific parts of an XML document using XPath expressions to navigate the document.
91
XML Validator
Used to syntax-check XML.
92
Valid XML Documents
A document that is well formed and conforms to a document type definition.
93
Document Type Definition (DTD)
Derived from SGML syntax, does not support datatypes or namespace, define order for child elements, and is not extensible.
94
What is a "well formed" XML document?
An XML document that contains correct syntax.
95
An XML document validated against a ___ is both "well formed" and "valid".
DTD
96
#PCDATA
Parseable character data.
97
An entity declaration has three parts:
it starts with an ampersand (&), then comes the entity name, and it ends with a semicolon (;).
98
DOCTYPE declaration
Used to define special characters or strings.
99
XML Schema Definition (XSD)
Written in XML, does support datatypes or namespace, define order for child elements, and is extensible.
100
Pros for using XSD
XML files can carry a description of its own format. Independent groups of people can agree on a standard for interchanging data. Data can be validated.
101
Since XSD supports data types, it is easier to:
Describe document content Define restrictions on data Validate the correctness of data Convert data between different data types
102
Hypertext Processor (PHP)
A server scripting language, and a powerful tool for making dynamic and interactive Web pages.
103
XML cannot be generated on a server without any installed XML software.
False, XML can be generated on a server without any installed XML software.
104
To generate an XML response from the XML server use ___ or ___.
PHP or ASP
105
Active Server Pages (ASP)
A development framework for building web pages.
106
XML can be generated from a database without any installed XML software. True or false?
True
107
XML files can be stored on an Internet server exactly the same way as HTML files. True or false?
True