XLM Flashcards
describe meta-markup languages
- A more flexible approach: Define your own tags!
- Makes machine-independent data (able to run on a variety of computers)
- Data can be used for different purposes
- Any set of tags is an “application”
- Descriptive markup — make meaning explicit
differences between XHTML and HTML5
XHTML
- superseded by HTML5
- Part of the family of XML markup languages
- compared to HTML, it is more rigid and strict, you cannot deviate from the syntax; this allows for well-structured, non-erroneous documents
- not easy to use for other purposes HTML5
- Able to define new elements (not tags)
- Still mostly intended for display of documents and objects on the Web
- Its descriptive properties are still rather limited
characteristics of XLM (Extensible Markup Language)
- XML files are plain text files just like HTML files
- Hence, can be easily, cheapily, and widely accessibly distributed eletronically
What is XML?
- XML stands for eXtensible Markup Language
- XML is a markup language much like HTML
- XML was designed to store and transport data
- XML was designed to be self-descriptive
- XML is a W3C Recommendation
- XML is both human-readable and machine-readable.
- XML keeps it in a structured format when sending because the elements in files are defined.
- separates style from content
- supporting validation
The Difference Between XML and HTML
XML and HTML were designed with different goals:
- XML was designed to carry data - with focus on what data is
- HTML was designed to display data - with focus on how data looks
- XML tags are not predefined like HTML tags are
how is XLM extensible?
Most XML applications will work as expected even if new data is added or removed.
is XLM seperate from presentation?
Yes, hence many different presentation styles can be applied using CSS
How is XLM related to HTML? When do they work together?
In many HTML applications, XML is used to store or transport data, while HTML is used to format and display the same data.
How can HTML data be edited through XLM?
XML Separates Data from HTML
When displaying data in HTML, data can be stored in separate XML files.
With a few lines of JavaScript code, you can read an XML file and update the data content of any HTML page.
How is XLM used in the industry?
Thousands of XML formats exists, in many different industries, to describe day-to-day data transactions:
- stocks and shares
- fianncial transactions
- scientific measurements
What makes XLM valid?
valid means
- well-formed (correct syntax)
- correct document structure (DTD)
What is the high-level structure of XLM?
tree structure
one root”
All elements can have sub elements (child elements):
root > child > sub-child
what is the prolog of an XLM document
` < ?xml version=”1.0” encoding=”UTF-8”? > `
XLM syntax rules
- a XML documents must have ONE root Element per document
- optional: the XLM prolog
- all XML elements must have a closing tag
- tags are case sensitive
- attribute values must be quoted < p id=”…
- Element names must start with a letter or underscore (except “xlm”)
- Element names can contain letters, digits, hyphens, underscores, and periods
- Element names cannot contain spaces
- proper nesting
- don’t use < and & inside elements, use < instead
What is an XML Element?
Everything from (including) the element’s start tag to (including) the element’s end tag.
may contain:
- text
- attributes
- other elements
- or a mix of the above
what is an empty XLM element?
what are the two ways to write one?
an element with no content
< element > < /element >
< element / >