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 rules for naming elements?

The names that you can use for elements are fairly open, though it’s often best to format the names so that it’s easy to tell what data the element contains as well as easily readable.

The basic rules for naming elements are as follows:

            Element names can contain letters, numbers, and special characters

            Element names cannot start with a number or punctuation character

            Element names cannot start with the letters ‘xml’

            Element names cannot contain spaces

For a bit of practice, consider the following incorrect XML names.  Using the same general name, create a name that follows the rules above.

            <xmlData>

            <4Cats>

            <?s_for_Bob>

            <cat info>

Possible answers to this practice are:

            <DataForXml>

            <FourCats>

            <Questions_for_Bob>

            <cat_info>

Note the use of capitalization to make reading the names easier.  Also, while special characters can be used, you should avoid the use of the period, the colon, and the hyphen… these can cause errors because the processor thinks that you’re doing something other than just creating a name for an element.  You should also be careful when using foreign characters, since it’s possible that the processor might not recognize them.

 

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