logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Manga / Comics
Crime
Cosmetics
Knitting
Breast Cancer


dailyclick
All times in EST

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

XML Basics

If you've spent some time hanging around web developer forums, you've probably seen the word 'XML' dropped more than once. Out of curiosity, you browse over to the Wikipedia entry for 'XML' and read:

"The Extensible Markup Language (XML) is a general-purpose specification for creating custom markup languages.[1] It is classified as an extensible language because it allows its users to define their own elements. Its primary purpose is to facilitate the sharing of structured data across different information systems, particularly via the Internet,[2] and it is used both to encode documents and to serialize data. In the latter context, it is comparable with other text-based serialization languages such as JSON and YAML..."

By now your eyes are probably glazing over and you’re wishing you’d never even HEARD of XML.

Well, don't panic, because it’s really not as complicated as you think!

XML is, quite simply, a way to store information. The beauty of XML is that it's completely customizable by YOU, the web developer. There's no fussy code to learn or debug, since you can use whatever names you like for the fields. It's actually the easiest programming language to learn because you define most of the code yourself.

OK, let's look at an example. Suppose you wanted to create a catalog of your favorite books. Using XML, your entries would look something like this:

<book>
<author>Fred Flintstone</author>
<title>Rock Music</title>
<comments>My favorite book!</comments>
</book>

As with HTML, the text between the < > symbols is called a 'tag.' The difference in XML is that you, the web developer, can define your own tags and call them whatever you like. There are a few syntax rules to learn before you start building your own tags:

  • Every opening tag must have a matching closing tag. In other words, if you have the tag <book> in your XML document you must have the closing tag </book> somewhere further down.

  • Unlike HTML, tags in XML are case-sensitive. That means
  • A few characters have pre-defined meanings and can't be used within a tag. They are: less-than symbol (<), greater-than symbol (>), ampersand (&), apostrophe (') and quotation mark (").


Perhaps the biggest advantage to using XML is that its documents are stored on your computer in plain text format. As a result, any computer, browser or server can understand these files regardless of type, so you can easily share data with your visitors. XML files can be used with almost any computer application. It's also easy to call XML files from an HTML page, meaning that you don’t need to worry about redoing HTML every time you add more data – the only thing you need to adjust is the XML document.

Stay tuned for our next article, in which we’ll break down the elements of an XML file and help you build your first XML document.

RSS | Related Articles | Previous Features | Site Map


Content copyright © 2008 by Elizabeth Connick. All rights reserved.
This content was written by Elizabeth Connick. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

Digg! g delicious Save to Del.icio.us

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
HTML Fundamentals – The Head Section

Absolute vs. Relative Links

How to Measure Your Site's Performance

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2008 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor