Section 1: Introduction Flashcards

Introduction

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
Q

All elements must be properly ___ with each other.

A

nested

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

Pre-Defined Entity References

A

< > & ' "

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

<

A

( < ) less than symbol

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

>

A

( > ) greater than symbol

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

&

A

( & ) ampersand symbol

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

'

A

( ‘ ) apostrophe

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

"

A

( “ ) quotation mark

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

The parser interprets “<” as the start of a…

A

new element

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

Comment Syntax

A

<!-- This is a comment -->

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

XML does not remove multiple white spaces. True or false?

A

True

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

XML stores a new line as…

A

line feed (LF)

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

Line Feed (LF)

A

A control character used in computing and communications to indicate the end of a line of text and the start of a new line.

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

An XML element can contain:

A

text, attributes, other elements, mix of all

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

Empty XML Element

A

Does not contain content.

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

Empty elements cannot have attributes. True or false?

A

False, empty elements can have attributes.

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

Element Naming Rules

A

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.

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

What is the correct syntax of the declaration which defines the XML version?

A

<?xml version=”1.0” ?>

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

Why should you avoid “-“ if you name something “first-name”?

A

Some software may interpret it as “name” being subtracted from “first”.

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

Why should you avoid “.” if you name something “first.name”?

A

Some software may interpret “name” as a property of the object “first”.

44
Q

Why should colons be avoided in naming elements?

A

Colons are reserved for namespaces.

45
Q

Commonly used naming conventions for XML elements:

A

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
Q

XML documents often have a corresponding ___ and it is common to use the naming rules of it for the XML document..

A

database

47
Q

Attribute values must always be quoted using…

A

single or double quotes

48
Q

If an attribute value itself contains double quotes, you can use ___ .

A

single quotes or character entities

49
Q

What needs to be considered when using attributes?

A

Attributes cannot contain multiple values or tree structures and are not easily expandable (for future changes).

50
Q

Elements can contain multiple values and tree structures. True or false?

A

True

51
Q

Is <1dollar> a correct name for an XML element?

A

No, starts with a number.

52
Q

What is an XML instance?

A

An XML document.

53
Q

XML Namespaces

A

A collection of names that can be used as element or attribute names in an XML document.

54
Q

XML Namespace Declaration Syntax

A

xmlns:prefix=”URI”, xmlns is a reserved word that is used only to declare a namespace

55
Q

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?

A

False, all child element with the same prefix are associated with the same namespace.

56
Q

Namespace can be declared in the XML ___.

A

root element

57
Q

Uniform Resource Identifier (URL)

A

A string of characters which identifies an Internet Resource.

58
Q

Uniform Resource Locator (URL)

A

Identifies an Internet domain address.

59
Q

What is the most common URI?

A

URL

60
Q

Extensible Stylesheet Language Transformations (XSLT)

A

A language that can be used to transform XML documents into other formats.

61
Q

Defining a default ___for an element saves us from using prefixes in all the child elements.

A

namespace

62
Q

Default Namespace Syntax

A

xmlns=”namespaceURI”

63
Q

To view raw XML source, try to select ___ or ___ from the browser menu.

A

“View Page Source”, “View Source”

64
Q

XML HttpRequest Object can be used to:

A

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
Q

XML Parser

A

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
Q

XML DOM (Document Object Model)

A

Defines a standard way for accessing and manipulating XML documents.

67
Q

Before an XML document can be accessed it must be loaded into an ___.

A

XML DOM object

68
Q

All XML elements can be accessed through the XML DOM. True or false?

A

True

69
Q

XPath

A

A syntax for defining parts of an XML document, contains a library of standard functions.

70
Q

What is a correct way of referring to a stylesheet called “mystyle.xsl” ?

A

<?xml-stylesheet type=”text/xsl” href=”mystyle.xsl” ?>

71
Q

What XML DOM object represents a node in the node tree?

A

The node object.

72
Q

Attributes must occur in defined order. True or false?

A

False

73
Q

For the XML parser to ignore a certain section of your XML document, how could it be written?

A

<![CDATA[ Text to be ignored ]]>

74
Q

XPath Expression

A

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
Q

Extensible Stylesheet Language Transformation (XSLT)

A

Used to transform XML documents into XHTML documents, or into other XML documents using XPath.

76
Q

XQuery

A

A language for finding and extracting elements and attributes from XML documents that is built on XPath expressions.

77
Q

XQuery can be used to:

A

Extract information to use in a Web Service
Generate summary reports
Transform XML data to XHTML
Search Web documents for relevant information

78
Q

XLink

A

Used to create hyperlinks within XML documents.

79
Q

With XLink, the links can be defined outside the linked files. True of false?

A

True

80
Q

XLink Syntax

A

xlink:href

81
Q

To get access to the XLink features we must…

A

declare the XLink namespace

82
Q

xlink:actuate

A

Defines when the linked resource is read and shown.

83
Q

onLoad

A

Values of xlink:actuate where the resource should be loaded and shown when the document loads.

84
Q

onRequest

A

Values of xlink:actuate where the resource is not read or shown before the link is clicked.

85
Q

xlink:show

A

Specifies where to open the link. Default value is “replace”.

86
Q

xlink:show value options

A

embed, new, replace, other, none

87
Q

xlink:actuate value options

A

onLoad, onRequest, other, none

88
Q

xlink:type

A

Specifies the type of link.

89
Q

xlink:type value options

A

simple, extended, locator, arc, resource, title, or none.

90
Q

XPointer

A

Allows links to point to specific parts of an XML document using XPath expressions to navigate the document.

91
Q

XML Validator

A

Used to syntax-check XML.

92
Q

Valid XML Documents

A

A document that is well formed and conforms to a document type definition.

93
Q

Document Type Definition (DTD)

A

Derived from SGML syntax, does not support datatypes or namespace, define order for child elements, and is not extensible.

94
Q

What is a “well formed” XML document?

A

An XML document that contains correct syntax.

95
Q

An XML document validated against a ___ is both “well formed” and “valid”.

A

DTD

96
Q

PCDATA

A

Parseable character data.

97
Q

An entity declaration has three parts:

A

it starts with an ampersand (&), then comes the entity name, and it ends with a semicolon (;).

98
Q

DOCTYPE declaration

A

Used to define special characters or strings.

99
Q

XML Schema Definition (XSD)

A

Written in XML, does support datatypes or namespace, define order for child elements, and is extensible.

100
Q

Pros for using XSD

A

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
Q

Since XSD supports data types, it is easier to:

A

Describe document content
Define restrictions on data
Validate the correctness of data
Convert data between different data types

102
Q

Hypertext Processor (PHP)

A

A server scripting language, and a powerful tool for making dynamic and interactive Web pages.

103
Q

XML cannot be generated on a server without any installed XML software.

A

False, XML can be generated on a server without any installed XML software.

104
Q

To generate an XML response from the XML server use ___ or ___.

A

PHP or ASP

105
Q

Active Server Pages (ASP)

A

A development framework for building web pages.

106
Q

XML can be generated from a database without any installed XML software. True or false?

A

True

107
Q

XML files can be stored on an Internet server exactly the same way as HTML files. True or false?

A

True