07 - Data Formats Flashcards
(36 cards)
what does XML stand for?
eXtensible Markup Language
a text-based format for representing structured information
XML
XML was derived from ____
SGML (Standard Generalized markup Language)
a language used to describe other languages
metalanguage
XML is used as a ________
metalanguage
the basis of format standards such as UBL, HTML, SVG, MathML
XML
what is the most recognizable features of XML
the tags or elements (AKA markup)
XML elements can contain (3)
- text
- attributes
- other elements
naming rules for XML elements/tags (4)
- element/tag names are case sensitive
- element/tag names can contain letters, numbers, hyphens, underscores, and periods
- element/tag names can only start with a letter or underscore
- element names can’t contain spaces
true/false:
XML tags can be left opened
false, all tags must be closed
true/false:
attributes must be quoted (code = “CMSC100”)
true
why do we need xml?
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
an XML document that describes the structure of other XML-based languages
XML Schema
XML Schemas provide the following info about a language (3)
- list of valid elements
- valid types of the elements
- structure/syntax of the language
XML Schemas are used by programs that parse XML content such as (2)
- XML Validators
- Code Editors
true/false:
documents that utilize any schema can use single-line schema declarations
false, only documents that use known schemas can use single-line schema declarations
what does JSON stand for?
JavaScript Object Notation
JSON data is built on which 2 structures
- Objects
- Arrays
true/false:
the JSON objects is neither an object nor an array, it is its own thing
false, it is either an object or an array
collection of key-value pairs separated by colons and delimited by commas
objects
ordered lists of values, its contents does not have to be of a single type
arrays
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
true
JSON values can be (6)
- Strings
- Numbers
- Boolean
- Arrays
- Objects
- null
sequence of one or more unicode characters, surrounded by double quotes
strings