Many people think that XML (Extensible Markup Language) is a replacement for HTML. XML and HTML are both "markup languages". A markup language consists of tags that are added to text to change the look or meaning of the text.
Welcome to Bucaro TecHelp!

Welcome to Bucaro TecHelp!
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact Advertise on Bucaro TecHelp Advertise Here RSS News Feeds News Feeds


Hello World! Computer Programming for Kids and Other Beginners

Hello World! Computer Programming for Kids and Other Beginners

This book provides a gentle but thorough introduction to computer programming. It's written in language a kid can follow, but anyone who wants to learn how to program a computer can use it. Even adults.

Teaches using the powerful object-oriented but easy-to-use open source Python programming language.

Click Here

XML Made Easy

Many people think that XML (Extensible Markup Language) is a replacement for HTML. XML and HTML are both "markup languages". A markup language consists of tags that are added to text to change the look or meaning of the text. After XML or HTML tags are added to the text, the text is called "code". Below is an example of HTML code.

Wiew Code

This HTML code defines how the text will be displayed. It defines the font face, font size, and color of the text. It defines that the text will be displayed as a column. HTML is about displaying information, but it tells you nothing about the information. Below is an example of XML code.

Wiew Code

This XML code defines the meaning of the text. It defines a "name" data element within a "members" element. Each name contains a "first" and "last" element. It defines that the members element can contain multiple name elements. XML is about describing information, but it tells you nothing about how to display the information.

The intent of this article is to give you a top-down understanding of XML, so I don't want to go into every detail of the code. Briefly, the top line of the code above is the "XML declaration" The section below that is the "document type declaration" (DTD). It defines the structure of a document of type "members". The section below the DTD is the "document element". It contains all the data in the XML document.

I know what your thinking. So how do I display the XML data on my Web page? That is accomplished by binding the XML elements to HTML elements. Below is an example.

Wiew Code

The first line in the body of the HTML code above links the XML document to the Web page. This creates a "data island" in the HTML page. Notice that I assigned the identifier "memberlist" to the data island. The next line binds the entire data island to an HTML table. The table defines a single row with two data elements. The first data element contains a span bound to the "first" datafield. The second data element contains a span bound to the "last" datafield. When the browser displays the table, it automatically repeats the row element for each record in the XML document.

Wiew Code

Did you notice the word "record" in the last sentence. When Internet Explorer opens the Web page, it creates a database called the "Data Source Object" (DSO). The DSO stores each name as a record with each first element and last element as fields in the record.

Programming Sections
XML


[Site User Agreement] [Advertise on This site] [Search This Site] [Contact Form]
Copyright©2001-2011 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268