![]() |
|
| • All Online Courses • New Courses • QuickTips • Word Definitions • Submit a Tutorial • Links • |
|
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:
About Us : Contact Us : Advertise : Privacy Information