XML Part 1: Context and Relationship to HTML

By | January 23, 2020


Oh this is the first video of a couple
videos that a few videos that I’d like to record introducing you to the idea of
XML and how XML is created and some of the ways in which it is co-evolved with
HTML so to high-level you should know that many user interface designs are
expressed through XML or XML like languages XML is used for more than just
user interface design but it’s a foundation of a way in which data is
expressed in many different venues in many different places in computer
science and computing by understanding XML it’s going to help you with web
development because many of the files that we work with in web development are
based on XML it’ll help in debugging network problems if we encounter XML
when we are transferring data and will help in future proofing you against new
technologies that will come in the future that would be based on XML
knowing how XML is formed will help you to be grounded when these new ideas and
new formulations are introduced so let’s start with what XML stands for XML is
three letters it’s an acronym sort of that stands for extensible markup
language is one of many different places where you’ll see the ml show up in
acronyms standing for markup language for example HTML which stands for
hypertext markup language HTML of course is the web’s core language for creating
content for everyone to use anywhere and that from the w3c organization so what’s
the relationship of the two let’s talk a little bit about the history of HTML in
particular I’m HTML traces its roots back to nineteen eighty-nine Tim
berners-lee is credited with the invention of the world wide web and that
entailed HTML as its publishing language HTML was based on a previous generation
of Markov mark up language called sgml and ask GM L had this idea of separating
data from the presentation of that data yet it didn’t have any hypertext the way
HTML did in 1993 the mosaic browser was released
the mosaic browser is one of the very first browsers that was able to take
HTML files and then render them so that people could see them see the content
presented to them in the way that we’ve come to know now in 1994 the world wide
web consortium was formed the world wide web consortium of which tim berners-lee
was an integral part became a standards body for which many of the languages for
example HTML and other protocols that the World Wide Web uses were
standardized so that browsers all browsers could work off the same data
and so that many different organizations that exist in the world could
interchange data effectively in 1995 HTML to point o one of the first
standards of HTML was really it was published by the internet Engineering
Task Force and in 1995 shortly after that Internet Explorer was released
Internet Explorer was a competitor to the mosaic browser the mosaic browser
eventually became Netscape the company in the browser and Netscape eventually
became Firefox there’s quite a story between the competition between
Microsoft Internet Explorer and Netscape I’m that hinged on a moment when
Microsoft decided to release Internet Explorer as a free program causing
anyone any organization in particular Netscape that was trying to compete by
making money by selling the browser to not be able to compete after all so
Internet Explorer was released in 1995 1997 w3c published HTML 3.2 in 99
four-point-oh won a pretty major milestone in the HTML language
development in two thousand we had the XHTML standard release XHTML was a
merger of the XML language and the HTML language more recently in 2010 the html5
draft standard was released and in 2014 html5 was finalized on October 28 2014
all part of the w3c which is the organization that standardizes HTML so
xml and HTML have a bit have had a bit of a rocky relationship i would
characterize xml is coming from more of a theoretical or a
academic standpoint and HTML being generated more by practitioners and
people who were more interested in getting the technology out there
academic researchers did a lot of work in formalizing the XML language and they
came together with the ex HTML standard which was a standard which was both HTML
and XML at the same time since then html5 has continued to evolve and
strictly speaking it is Amit is an XML although it’s very very close what is
html5 well html5 as this quote from the communications of the ACM tells us is
most often thought of broadly to include new versions of the markup language
itself and its associated standard for accessing and manipulating HTML
documents the document object model cascading style sheets or CSS which is a
language to define the presentation and appearance of an HTML document and
javascript of scripting language the term html5 is often used even more
broadly to include specific application programming interfaces such as those
that enable new browser based graphics geolocation local storage and video
capabilities so from that we see that html5 is a lot of things but it is
definitely the evolution of the web publishing language in it it included
support for SVG which is vector graphics and math ml which is like la tech
language for making math formulas some new tags were added to html5 that had
some semantic meaning that wasn’t present before for example a tag for
section or a tag for article if you are a newspaper you could put an article
markup in your document it added multimedia processing for example a
canvas tag for doing bitmapped sections of a web page and video and audio for
presenting you know video and audio content some tags were deleted and also
in addition to that html5 included capabilities for offline storage drag
and drop from within and out of the browser as well as document editing
currently as this is being filmed HTML is at 5.2 which is a revision of 5.1
which in itself was a revision of 5 it’s at currently a w3c working draft
standard just minor modifications from the 50 standard
three different kinds of files that are very similar our xml HTML and json which
will touch on in the future these are all structured data formats that have
evolved with the web and with the creation of web applications each of
them is just text with a particular syntax that’s applied they can represent
a wide variety of different kinds of information and the reason they exist is
because they enable data transport they enable different systems different
technologies and different programming languages to all communicate with each
other because they depend on the syntax being standardized
so what does XML look like well here’s an example of some XML provided by the
w3c schools website and in it you can see a number of different things you can
see that there are tags those things that are enclosed within the angle
brackets you can see a special kind of line at the beginning of the file you
can see some indenting there you can see some color as well so XML is just a text
format and so this is all just text in a text file the color coding isn’t part of
the format the color coding was added by the editor that I captured here to help
see the different parts of the file you can see that this appears to be some
kind of an email or note application you can just see that without knowing
anything about XML because there’s something that says to and from there’s
a heading which looks like maybe a subject line and then a body and that’s
all I’m closer than this note so there’s some slashes and things are a little bit
unclear but at the end of the day you can see that an XML file can be read
just like any other text document and that there’s some meaning that’s
embedded in it that doesn’t need a special dot doesn’t need anything
elaborate necessarily to be able to read so let’s break down those different bits
a little bit in a second so as we said XML stands for extensible markup
language and the reason it was designed because it like sgml and HTML it was
designed to try and separate the data from the display of the data an XML was
created alongside HTML as people began developing HTML XML was designed as a
kind of pure form of HTML a version of data structuring language that was very
clean and wasn’t didn’t have any legacy baggage associated with it sort of the
pure form the you know the the Platonic ideal of HTML perhaps
in XML the tags are not predefined so those things we saw like note from to
those aren’t predefined those are just used within the body of the XML and you
as someone who’s writing an XML document are free to define your own tags as you
need them XML by virtue of having these tags was designed to be self-descriptive
meaning that you could understand some of the meaning of a document just by
looking at the text itself now xml and HTML are different though xml was
designed to transport and store data and it looks like HTML that the focus is
really on what the data is HTML originally was focused on how the data
looks and typically it’s considered as broken XML XHTML is a kind of HTML that
conforms to the XML standard so it’s a merger of both of them you can think
about it in terms of a Venn diagram like this HTML encompasses one whole set of
files and xml a slightly different set of files some of those files are both
HTML and xml and those files that are are called XHTML file
it’s important to point out that XML doesn’t do anything by itself it is just
a data format if you want to do anything with XML you need to write a program
that’s going to manipulate the data or to search the data to display the data
to change the data etc and in fact many programs have already been written that
do this and even though the data appears to be associated with the task for
example our note met our note data it’s still just data so in summary for this
introduction to HTML you should know that xml and HTML co-evolved next to
each other at various points that attempted to be merged together for
example as XHTML but html5 continued in its development doesn’t strictly conform
to the XML standard anymore HTML primarily was made by web authors who
were trying to solve problems quickly and XML is a more rigorous description
of the language that was being developed that formalizes these ideas of tags
based on data representation let’s dig into this a little bit more in another
lecture coming thank you you

One thought on “XML Part 1: Context and Relationship to HTML

  1. Alexandra Esmond Post author

    Very informative and clear, thanks for sharing!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *