| Tags
and Simple XML Tutorial
Testing XML
for Validity
Only valid XML is useable by browsers
and other applications. To test whether your XML file
obeys all these strict rules of syntax, just open it
in a browser.
Click here
to open the example below in a new window.
<?xml version="1.0" encoding="utf-8"?>
<hoops>
<college>
<elite8>
<team city="Lawrence" standings="2">Kansas</team>
<team city="LaGrange" standings="3">Georgia
Tech. </team>
<team city="Philadelphia" standings="5">St.
Joseph's</team>
<team city="Stillwater" standings="8">Oklahoma
St.</team>
<team city="Durham" standings="1">Duke</team>
<team city="Cincinatti" standings="4">Xavier</team>
<team city="Tuscaloosa" standings="5">Alabama</team>
<team city="New London" standings="8">Connecticut</team>
</elite8>
</college>
<pro>
</pro>
</hoops>
The XML will be indented and colour-coded
for easier understanding.
Try to open
this XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<head>
<table>
Learning XML is soooo easy!
</head></table>
You'll get an informative error that
will help you fix the problem.
|
XML Applied
You might never use XML, and if you
do there are applications that can write the XML for
you so you don't have to worry about the syntax. This
is important the more complex your XML file gets.
I use XML as an intermediary index
of content. I use PHP to write an XML file and I have
a Flash application read it and display objects based
on what the XML file says. I can then edit the XML file
with PHP.
In the Mote Interactive site I have
all my content stored in XML files. I get PHP to read
the XML files if you're browsing this site without Flash,
and I use Flash to read the XML files if you're using
it.
XML is small and portable. Other languages
like Cold Fusion and .NET can read and write XML files.
Cell phones and Flash applications can then use these
XML files. It's a universal intermediary language.
RDF and RSS are examples of applied
XML. News sources provide XML-formatted headlines and
links to their site, which other news aggregators read
and display.
But enough about XML, let's talk about
HTML
>>>HTML
MORE TUTORIALS
|