Data Formats Flashcards
(38 cards)
XML stands for
eXtensible Markup Language
- is a text-based format for representing structured information: documents, data, configurations, books, transactions, etc.
- derived from an older standard format called SGML (Standard Generalized Markup Language).
XML
HTML is a 1. ________ format, with a predefined markup language.
XML is used as a 2. ________. (a language used to describe other languages).
- fixed
- metalanguage
True or False
XML elements include the opening and closing tag, and everything in between.
True
XML can contain
1.
2.
3.
- Text
- Attributes
- Other Elements
True or False
Element/Tag Names are not case sensitive
False
Element/tag names can contain:
(5 items)
letters, numbers, hyphens, underscores, and periods
True or False
Element/tag names can only start with a letter or underscore
True
Valid or invalid tag?
<100CMSC>
Invalid
True or False
Element names can contain spaces
False
True or False
Attributes should not be quoted
False
Attributes must be quoted
- an XML document that describes the structure of other XML-based languages.
- They contain constraints about the syntax and valid data types of the document they’re describing.
XML Schema
- List of valid elements
- Valid types for the elements
- Structure/syntax of the language
XML Schema/s
Documents that use known schemas can use single-line schema declarations like HTML’s ____
DTD
DTD meaning
Document Type Definition
XML Schemas are used by programs that parse XML content:
- XML Validators
- Code Editors
JSON meaning
JavaScript Object Notation
True or False
JSON is PL/script independent, but it shares analogous concepts with most programming languages.
True
True or False
It uses similar conventions to C (C, C++, C#), Java, JavaScript, Perl, Python.
True
Valid or invalid? (JSON)
{
“title”: “HTTP: The Definitive Guide”,
“publisher”: “O’Reilly Media”,
“authors”: [ “Totty”, “Gourly” ]
}
Invalid
JSON must have straight quotation marks: “”
JSON data is built on 2 structures:
- Objects
- Arrays
True or False
The JSON ‘object’ itself is an object, not an array.
False
are collection of key-value pairs separated by colons ( : ) and delimited by commas ( , ).
Objects
are ordered lists of values. The contents of an array doesn’t have to be of a single type.
Arrays