![]() |
|
| • All Online Courses • New Courses • QuickTips • Word Definitions • Submit a Tutorial • Links • |
|
Learn XML programming in this free XML training course Alright, XML is an advanced Markup Language. But what does it look like?Though it may sound complicated, XML actually shares a lot in common with HTML. In fact, there’s even a language called XHTML, which was created to bridge the gaps between the two and make converting to XML easier for those who’d been using HTML for years… it still has some of the limitations of HTML, but the fact that it exists shows that there is common ground between the two. The first part of an XML document is the Directive, which tells your browser that it’s going to be looking at XML code and which version of XML the code is written in. If you’re using XML version 1.0, then your directive is going to look like this: <?xml version=”1.0”?> This will go at the very top of your page, and will be followed by the rest of the page information. If the page that you created previously about Tooter and Shade was an extremely basic XML document, then the code for it would look a little something like the following: <?xml version=”1.0”?> <p>Tooter is a fat, fuzzy black cat.</p> <p>Shade is a slightly thinner short-haired gray cat.</p> <p>Both of the cats are spoiled rotten.</p> Of course you wouldn’t be using XML for something as simple as this, but it helps to give you an idea of the sort of things that you’ll be looking at. A lot of people upon hearing the word “code” think that they’ll be looking at a bunch of numbers and letters that no one but programmers can make heads or tails of… while there are instances of web page coding that looks like that, the majority of it is a lot closer to the Tooter and Shade example. You said that XML isn’t limited by its tags, and has custom tags. What do you mean?The main benefit of XML is the fact that it allows for the creation of custom tags within the code itself. Whereas HTML and other languages are more or less stuck with the limitations of their tags and commands, XML is able to move beyond those limitations. While it’s true that creative HTML users are able to skirt around some of the hang-ups of the language, the problems are still there. In XML, the problem points can pretty much be taken away by the addition of new code to the page, which defines what the browser should do when it encounters the problem. Of course, another benefit of custom tags is that large amounts of code can be condensed into a single tag, thus saving a lot of potential problem points. As an example, let’s say that you wanted to make the names of your cats appear large, and bold, and red. To do this in HTML, you’d need to add tags like the following every time you came to a cat’s name: <b><font size=”15” color=”red”> Then you’d type Tooter or Shade’s name, and have to close all of your tags: </font></b> That’s a lot of typing just for a single word! Using XML, though, you can create a custom tag called <cats>, and have it contain both the bolding instructions and the font size and color. Now, when you’re typing and come to Tooter’s name, you can put this: <cats>Tooter</cats> Obviously, this is a lot simpler, and greatly reduces the chance of mistakes made by typos or cats wandering across your keyboard. There are other benefits to XML, as well. Increased use of Style Sheets, Document Type Definitions, and the integration of elements from other languages all help to make XML one of the most powerful and adaptive programming languages ever created.
by John Casteele Find more free Internet tutorials from Learnthat.com. More Information:
Help us by rating this tutorial: [---] [--] [+] [++] [+++] [---] lowest; [+++] highest
|
|
||||||
![]() |
Learn: Free
Tutorials - Links
to Free Tutorials
Understand: Free Technical Definitions
- ExplainThat Whitepapers
Use: Certification Section -
Discussion Forum
Visit Our Network Sites:
About Us : Contact Us : Advertise : Privacy Information