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

 

What are XML attributes?

Attributes are additional pieces of data that are included in the opening tag of an element.  When declaring attributes, they are listed right before the closing bracket of the opening tag, and aren’t listed anywhere else in the element.  The style of the attribute is attribute_name=”attribute_data”.

Attributes can consist of any of a variety of types of data… pictures, serial numbers, product names, and more can be recorded as an attribute and used in multiple ways in XML.

As an example, let’s say that you’ve created attributes for all four of the cats that you’ve mentioned so far.  Since there are only two cats in each element, you can re-use the attributes; you’ve named the attributes cat_1 and cat_2, and they each call up additional data about the cat in question.  Putting them into your file, you’d have something that looked like this:

            <?xml version=”1.0”?>

            <!- - This XML document is practice, and documents great cats. - ->

            <?xml-stylesheet type=”text/css” href=”cats.css”?>

            <cats_info>

                        <cats cat_1=”Tooter” cat_2=”Shade”>Tooter and Shade are the best cats in the world!</cats>

                        <friends cat_1=”Loki” cat_2=”Sally”>Loki and Sally are pretty cool cats as well, though.</friends>

            </cats_info>

Of course, you still have to define what the attributes are used for elsewhere… remember, this is just practice to give you an idea of what an XML document looks like.  In the next section and those that follow it, you’ll be introduced to creating stylesheets and other essential parts of XML pages and will leave this basic framework behind.  Go ahead and save cats.xml, and get ready to move into the next stage of XML coding.

 

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