So there's just the text, what you call the text nodes.
And then, there are attributes, and attributes are always on the start tags.
So the phone and the email, and
they are key-value pairs using double quotes, as the type="intl".
And the key thing about XML versus HTML is we get to make up the tags.
In HTML we say things like h1 or a for the anchor tag,
or h1 for header level one.
Here, based on how we are going to agree between the two applications exchanging
data, you can say the tag is person and /person.
You still have to follow the rules, though, there is a slash tag at the end.
So attributes. And then you can also have a self-closing tag.
And that is, you just include this /> at the end of the open tag.
And it's as if you have a closing tag of the same name with an empty text area.
And so that's what this is saying, so that's a self-closing tag.
Okay, like I said the whitespace doesn't really matter so much.
We can pull these things up, we tend to indent them
like any kind of programming environment to help our own reading.
But, in general, whitespace,
except in the middle of things like these text areas, the whitespace does matter.
But, sort of, between here and here, the whitespace doesn't matter.
Between here and here, the whitespace doesn't matter.
So the whitespace, these extra spaces that I used to indent it,
it doesn't really matter.
The only time it matters is in between, when you're in a text area.
Here's some sample XML, just to give you some ideas.
Here we have, there's always one big outer tag of XML,
you have the start tag and an end tag.
And there's only one of those, because I can't be, sort of, multiply defined.
There's always the outer tag. We see a series of attributes. Right?
So the attributes are key equals and
then double=quoted string, key equals double=quoted string.
And if you look at the HTML, you'll see that this is exactly the same as HTML.
The difference is in HTML you're supposed to have a thing called href= "blah,
blah, blah", right?
And so HTML is kind of like XML that's more highly specified.
Whereas this is just two programs agree on a format and they use it.
So we have an outer tag that's a complex element.
And then we have, like
in that title, you can have sort of things that are in order, like this ingredient.
You see some attributes on there, and
then you have a text block in the middle of here.
So we'll see in a second how these things all work. And then a sub tag.
It's like a tree, we'll see that in a second, and a series of steps.
And so these can be in order, they can be more than one of these things.
And we can create all kinds of structures that are really designed based on
the needs of our working two applications that are trying to cooperate.
So tags are the beginning and the end.
Attributes are key-value pairs on the start tag.
Serialization and deserialization is the act of taking from an internal structure
in one programming environment, sending it across the network.
Deserialization is receiving across the network and
translating it back into an internal structure on the destination computer.