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

 

Section 4:  Working With XML

What are XML namespaces, and how are they used?

XML namespaces are useful little pieces of programming that are used to make your elements unique among the entire world of XML pages.  They allow you to specify a URI, or Uniform Resource Identifier, such as an internet address, and define your elements in such a way that the browser will be able to see that your elements are unique from those that your friend Bob is using on his page about his cats, Tudor and Shady.

To create a namespace, you have to define it. This is done using the following format:

<namespace:element xmlns:namespace=”unique_URI”>

</ namespace:element>

You also need to apply the namespace to any attributes or elements contained within the particular element that you’re naming.

An example of a namespace in a file would be as follows:

<my_cats:cats_info xmlns:my_cats=http://www.mycatwebsite.org/cats>

            <my_cats:cats>Tooter and Shade are the best cats in the world!</ my_cats:cats>

                        <my_cats:friends>Loki and Sally are pretty cool cats as well, though.</ my_cats:friends>

</ my_cats:cats_info>

When a browser runs across this code, you can be sure that it’s not going to mistake anything inside of <cats_info> for information defined on any other site.  The namespace makes sure that it’s unique across the entire Internet by linking it to your URL (though the URI that you use doesn’t have to be the site’s URL.)

 

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