07 - Data Formats Flashcards

(36 cards)

1
Q

what does XML stand for?

A

eXtensible Markup Language

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

a text-based format for representing structured information

A

XML

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

XML was derived from ____

A

SGML (Standard Generalized markup Language)

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

a language used to describe other languages

A

metalanguage

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

XML is used as a ________

A

metalanguage

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

the basis of format standards such as UBL, HTML, SVG, MathML

A

XML

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

what is the most recognizable features of XML

A

the tags or elements (AKA markup)

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

XML elements can contain (3)

A
  1. text
  2. attributes
  3. other elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

naming rules for XML elements/tags (4)

A
  1. element/tag names are case sensitive
  2. element/tag names can contain letters, numbers, hyphens, underscores, and periods
  3. element/tag names can only start with a letter or underscore
  4. element names can’t contain spaces
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

true/false:

XML tags can be left opened

A

false, all tags must be closed

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

true/false:

attributes must be quoted (code = “CMSC100”)

A

true

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

why do we need xml?

A

XML makes understanding the code easier and intuitive, tags are named after what they represent unlike HTML

additionally, the strictness of XML makes the syntax less ambiguous and easy to read and debug

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

an XML document that describes the structure of other XML-based languages

A

XML Schema

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

XML Schemas provide the following info about a language (3)

A
  1. list of valid elements
  2. valid types of the elements
  3. structure/syntax of the language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

XML Schemas are used by programs that parse XML content such as (2)

A
  1. XML Validators
  2. Code Editors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

true/false:

documents that utilize any schema can use single-line schema declarations

A

false, only documents that use known schemas can use single-line schema declarations

17
Q

what does JSON stand for?

A

JavaScript Object Notation

18
Q

JSON data is built on which 2 structures

A
  1. Objects
  2. Arrays
19
Q

true/false:

the JSON objects is neither an object nor an array, it is its own thing

A

false, it is either an object or an array

20
Q

collection of key-value pairs separated by colons and delimited by commas

21
Q

ordered lists of values, its contents does not have to be of a single type

22
Q

true/false

objects and arrays are universal data structures, meaning in all PLs it exists or at least has some sort of equivalent data structure

23
Q

JSON values can be (6)

A
  1. Strings
  2. Numbers
  3. Boolean
  4. Arrays
  5. Objects
  6. null
24
Q

sequence of one or more unicode characters, surrounded by double quotes

25
process of converting data structures/object states into formats that can be stored and later reconstructed
serialization
26
an object to be serialized may be a/an _____ created by a running program
object/data structure in memory
27
common format choices for transporting data over the web
XML and JSON
28
how is an object/data structure stored?
objects/data structures in memory is serialized and can either be transported into network or stored in a local file/storage
29
reverse process whereby data in a serial format is restored into memory
deserialization
30
how are objects/data structures saved in storage loaded into a program?
from storage (either local or through a network), data is deserialized and is then used by the program as either an object or a data structure
31
what does it mean for JSON and XML to be self-describing?
it means to be human readable, XML is human readable through its tags and elements while JSON is human readable because of how it is constructed and stored
32
true/false: XML is hierarchical while JSON is not
false, both are hierarchical
33
true/false both xml and json are standard content types on the web
true
34
true/false json is more verbose than xml
false, xml is more verbose than json
35
what is xml's only explicit data type
string
36
compare xml and json in terms of: 1. verbosity 2. explicit data types 3. ambiguity 4. human readability/hierarchical structure 5. PLs parsing and writing
1. Verbosity a. XML : more verbose b. JSON: less verbose 2. Data types a. XML : string b. JSON: number, string, boolean, arrays, objects 3. Ambiguity a. XML: some ambiguity b. JSON: no ambiguity 4. human readability and structure - both have a human readable and hierarchical structure 5. PLs parsing and writing - both are supported by many PLs for parsing and writing