Section 1: Introduction Flashcards
Introduction
What does stand XML for?
eXtensible Markup Language
What is XML?
A software and hardware independent tool for storing and transporting data.
HTML
Designed to display data, focuses on how data looks.
XML was designed to…
carry data
XML Tags
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.
XML tags are predefined. True or false?
False, author must invent/define the tags.
XML simplifies:
data sharing, data transport, platform changes, and data availability
XML stores data in plain text format which provides software and hardware independent way of storing, transporting, and sharing data. True or false?
True
XML data ___ be stored in separate XML files.
can
XML Tree
XML documents form a tree structure that starts at the “root” element and branches to the “leaves” or child elements.
All elements must contain…
content and attributes
Attributes
Designed to contain data related to a specific element.
Can elements have sub/child elements?
Yes
Prolog
If included, it is the first line of an XML document that defines the XML version and the character encoding.
XML documents must contain one ___ that is the parent of all other elements.
one root element
Element
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.
Entity Refereneces
A group of characters used in text as a substitute for a single specific character.
What is the default character encoding for XML documents?
UTF-8
UTF-8
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.
Does the prolog require a closing tag?
No, it is not considered a part of the XML document.
XML documents cannot contain internationals characters. True or false?
False
It is illegal to omit the closing tag in XML. True or false?
True
What would the tags of an element named message look like?
<message>This is correct</message>
Opening and closing tags also referred to as…
Start and End tags
All elements must be properly ___ with each other.
nested
Pre-Defined Entity References
< > & ' "
<
( < ) less than symbol
>
( > ) greater than symbol
&
( & ) ampersand symbol
'
( ‘ ) apostrophe
"
( “ ) quotation mark
The parser interprets “<” as the start of a…
new element
Comment Syntax
<!-- This is a comment -->
XML does not remove multiple white spaces. True or false?
True
XML stores a new line as…
line feed (LF)
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.
An XML element can contain:
text, attributes, other elements, mix of all
Empty XML Element
Does not contain content.
Empty elements cannot have attributes. True or false?
False, empty elements can have attributes.
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.
What is the correct syntax of the declaration which defines the XML version?
<?xml version=”1.0” ?>
Why should you avoid “-“ if you name something “first-name”?
Some software may interpret it as “name” being subtracted from “first”.