This introduction teaches you:
- What XML is
- Why it's used
- The basics of storing data with XML
XML is not hard to learn and this tutorial can help you.
What it is
- XML stands for Extensible Markup Language
- XML IS NOT a scripting language and you CANNOT make a website solely out of XML
Why it's used
XML is used for storing and transferring data easily and efficiently.
The Basics of Storing Data
With XML, storing data is very simple. Because so, it's easier not to explain, and just show code, so you can get a feeling of how it works.
Here's some example code:
<?xml version="1.0" encoding="ISO-8859-1"?> <gamestore> <game> <title>SSBB</title> <console>Nintendo Wii</console> <cost>$50</cost> <description>You brawl with people, online or offline</description> </game> <game> <title>Metroid Prime III</title> <console>Nintendo Wii</console> <cost>$35</cost> <description>You shoot things</description> </game> </gamestore>
Link to web page with code.
As you can see, you can just put whatever you want in the <> tags.
This tutorial does not cover how to implement this into your web page, but here's a good tutorial to implement XML into an HTML web page.:
Q: What will happen if I make a syntax error?
A: The XML file will not be able to load, to prevent this I personally recommend this validator.
Q: Is it really that simple?
A: For storing data, aye.
I know I didn't cover a lot of things, but what do you guys think?
Probably going to add something on attributes next.