Introduction to XML

What Dr. Jon Storslee Taught Me at Paradise Valley Community College

PVCC • Maricopa Community Colleges • 2011

When people ask me what languages I speak, my first answer might be English.

But there is another language that changed the way I understand nearly every other language I encounter in cyberspace:

XML.

And the person who helped me understand why it mattered was Dr. Jon Storslee at Paradise Valley Community College.

I took his class at PVCC in 2011 while studying Web Development and Design. Of all the classes I took, his became my favorite—not because XML was necessarily the flashiest technology being discussed at the time, but because it taught me something much bigger than how to make a webpage.

It taught me how information describes itself.

That changed the way I understood cyberspace.

So What Is XML?

XML stands for:

eXtensible Markup Language.

At first glance, XML can look a lot like HTML:

<student>
    <name>Krysta</name>
    <school>PVCC</school>
    <subject>Web Development</subject>
</student>

But there is a fundamental difference.

HTML comes with an established vocabulary. We recognize elements such as:

<h1>
<p>
<a>
<img>

Those elements already have understood purposes within HTML.

XML gives us something different.

We can define the vocabulary.

For example:

<creeker>
    <name>Shimmer</name>
    <location>Cave Creek</location>
    <language>Geek</language>
</creeker>

The browser didn’t invent creeker.

I did.

That is the idea that fascinated me.

XML allows information to be structured according to what the information means, rather than merely according to how someone wants it displayed.

XML Taught Me to Think in Namespaces

Then comes one of the concepts that became particularly important to the way I think about the Web:

namespaces.

Imagine two systems both use an element called:

<name>

One system means a person’s name.

Another means a company’s name.

Another might mean a product name.

The word is identical, but the context isn’t.

Namespaces provide a way to distinguish those vocabularies.

Conceptually, we can say:

<person:name>Krysta</person:name>
<company:name>Does This Help</company:name>

Now we aren’t merely storing the word name.

We’re communicating:

whose definition of name are we using?

That is much closer to the real challenge of cyberspace.

Computers need more than information.

They need context for information.

XML Was Teaching the Architecture Behind the Screen

That is why Dr. Storslee’s class was so educational for me.

I wasn’t simply learning:

Put this code here and the browser does this.

I was learning to ask:

What is this information?

Who defines it?

Where does it belong?

How is it structured?

How does one system understand what another system is saying?

Those questions apply far beyond XML.

They apply to HTML.

They apply to databases.

They apply to APIs.

They apply to JSON.

They apply to JavaScript.

They apply to PHP.

They apply to WordPress.

They apply to practically everything we now build on top of the Web.

Then Consider AJAX

AJAX is a perfect example.

AJAX means:

Asynchronous JavaScript and XML.

It isn’t itself another programming language.

It describes a way technologies can work together.

A webpage can remain open while JavaScript communicates with a server, receives information and updates part of the page without requiring the entire document to reload.

Historically, XML was prominent enough in that architecture to put the X in AJAX.

Today developers very commonly exchange JSON instead.

And that’s okay.

Technology evolves.

But understanding XML teaches something that survives the individual technology:

structured information has to be understood on both sides of the conversation.

XML Didn’t Lose Just Because Something New Became Popular

This is where my experience in that classroom mattered to me.

Technology education can become obsessed with whatever everyone is using right now.

A new framework arrives.

A new language becomes popular.

A new library becomes fashionable.

Everyone runs toward it.

I was interested in what Dr. Storslee was teaching underneath all of that.

I wanted to understand the architecture.

I wanted to understand the standards.

I wanted to understand why one machine could communicate with another machine in the first place.

And I wanted to understand how information could remain meaningful when it moved between them.

That’s why XML mattered to me.

It wasn’t about arguing that every website should forever transmit XML.

It was about learning the principles XML exposes extraordinarily well:

structure, hierarchy, syntax, validation, identity, namespaces, interoperability and meaning.

Where PHP, JavaScript and Python Fit

This also explains why I don’t see technological languages as isolated islands.

I see an ecosystem.

                CYBERSPACE
                     |
             INFORMATION
                     |
          STRUCTURE + MEANING
                     |
        -------------------------
        |           |           |
       HTML        XML         JSON
        |           |           |
        -------- DATA ----------
                     |
               COMMUNICATION
                     |
              HTTP / APIs
                     |
          --------------------
          |                  |
     JavaScript          Server
                             |
                       PHP / Python
                             |
                         Database

Python is a programming language.

PHP is a programming language.

JavaScript is a programming language.

HTML and XML are markup languages.

JSON is a data-interchange format.

AJAX is a technique for asynchronous Web communication.

They are not technically the same kind of language.

But understanding their distinctions is precisely what makes someone technologically literate.

You begin seeing the conversation between them.

Why I Still Prefer the Web’s Native Architecture

I also have personal preferences as a developer.

I enjoy PHP.

I enjoy JavaScript.

I enjoy HTML.

I enjoy XML and namespaces.

And I particularly enjoy technologies that let me see clearly what is happening between the browser, server and information.

Python is extraordinarily useful and widely deployed, but it isn’t automatically the best tool for every Web-development problem. The same is true of PHP, JavaScript or any other language.

A slow application isn’t inherently proof that Python—or Microsoft, PHP, JavaScript or another technology—is slow. Performance depends upon architecture, implementation, databases, network latency, frameworks, caching, hardware and many other factors.

My preference is therefore not:

“Everything else is bad.”

It is:

“Understand the Web before hiding the Web behind another abstraction.”

That is the lesson I carried forward.

The Class Nobody Could Convince Me Was Obsolete

What I remember most strongly from 2011 is that other people were ready to move toward whatever technology seemed to be taking over next.

I wasn’t.

I wanted to keep learning what Dr. Storslee was teaching.

Because I could see something valuable underneath it.

More than fifteen years later, we live in a world of APIs, structured data, distributed services, namespaces, schemas, feeds, configuration documents and machines exchanging information with other machines constantly.

The syntax changes.

The fashionable technology changes.

The underlying problem remains:

How do we describe information so another system understands what we mean?

XML gave me a language for answering that question.

Dr. Storslee Didn’t Just Teach Me XML

That’s why his class was my favorite class at PVCC.

It helped teach me how to speak Geek.

Not merely:

<?php echo "Hello World"; ?>

Not merely:

console.log("Hello World");

Not merely:

<h1>Hello World</h1>

But how to look behind all three and ask:

What is the information?

What is its structure?

What language is describing it?

What system owns its meaning?

How is it transported?

What happens when another system receives it?

Once I understood those questions, learning another technological language stopped feeling like starting over.

I was learning another dialect of the larger conversation.

That is why, when someone asks me what languages I speak besides English, I have another answer:

I speak Geek.

And one of the teachers who helped me understand its grammar was Dr. Jon Storslee at Paradise Valley Community College.