Learnthat.com Free Certification and Computer Online Courses
ThatNetwork.com Internet Media Network Exampractice.com free certification practice exams, mcse, comptia Definethat.com - Free technical definitions, define Free Romance Tips, Romantic Tips, Date Ideas Free POD publisher comparison print on demand
Learnthat.com Free A+ Certification, Computer Classes, Certification Courses, Business, Lifestyle, ApplicationsFree business tutorials and definitionsFree certification tutorials and definitionsFree computer and technical tutorials and technical definitionsFree Finance Tutorials and DefinitionsFree House Repair TutorialsFree Lifestyle and Fun Tutorials
  All Online CoursesNew Courses QuickTipsWord DefinitionsSubmit a TutorialLinks
÷ Resources
Home
free tech tutorials
Free Tutorials
free tech tutorials
Certifications
free tech tutorials
Definitions
free tech tutorials
Resources/Links
free tech tutorials
Forums
free tech tutorials
Distance Education
free tech tutorials
Highest Rated Tutorials
÷ Popular Tutorials
÷ New Tutorials

Learn XML programming in this free XML training course

 

Section 2: XML Syntax

Alright, I want to use XML.  What do I do first?

The first thing that you’ll need to do is open up your text editor of choice.  Place your XML directive on the first line, as mentioned earlier.  At this point, your document is going to look something like this (if you’re using XML version 1.0):

<?xml version=”1.0”?>

Once you’ve typed your directive, it’s time to start adding some content to the page.  Information on an XML page is handled in a very precise and structured format, using tags to define your data.  White space can be included in the document, to make it more easily readable… though you should be careful not to use that white space inside of your tags, as it can create problems when being read by a browser.

Let’s say that you’ve decided to create a new XML document, to tell the world about your two favorite cats.  You want to use the tag, <cats>, and let everyone know how much you love those little furballs.  Your document now looks a little something like this…

<?xml version=”1.0”?>

<cats>Tooter and Shade are the best cats in the world!</cats>

Note the white space in between the directive and the first tags.  You could also have put both of the tags on their own line, with the content of the tags between them, as long as you don’t add additional white space within the tags.

Of course, for the moment the <cats> tags don’t do anything.  If you load this page into a web browser, you’ll end up with more or less a copy of the file contents displayed on the screen with the tags in some pretty colors.  You’ll have to define the tags, which can be done in 1 of 4 ways:

  • Using Cascading Style Sheets (CSS)
  • Using the  eXtensible Style Language (XSL) Style Sheets
  • Using a Data Island plus Script
  • Using a Data Object Model plus Script or Client-Side Program

All of this might sound complicated, but it’s really not.  It does involve creating and referencing other pages, though… and for now we’re still working on just the basic structure of XML.  Save your document (in Text-Only mode) under the name cats.xml (making sure to use the .xml extension) and we’ll get back to the <cats> tags in a moment.

 

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:

DefineThat.com Technical Defintions Romancetips.com
Free Gift Ideas - GiveThat Planthat.com Free Unique Business Ideas
PublishOnDemand.net - Learn about Print on Demand (POD) - Self Publishing Seekthat.com - Technical Search Engine
ThatNetwork.com  

About Us : Contact Us : Advertise : Privacy Information

© 1998-2004 Learnthat.com