aspose file tools*
The moose likes Product and Other Certifications and the fly likes XML Namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "XML Namespace" Watch "XML Namespace" New topic

XML Namespace

hari ann

Joined: Dec 09, 2007
Posts: 11

i am newbie to XML. i am learning XML namespace.

in xml namespace decleration, what is the URI. what is the value should be.

xmlns:prefix="some URI"

Paul Clapham

Joined: Oct 14, 2005
Posts: 18987

It should be whatever the person who owns the namespace says it should be.

If you are the owner of the namespace, then you should use a string that nobody else will ever use. The traditional way to make sure of that is to use an HTTP URI that belongs to your organization. For example if Unicef's Canadian subsidiary needed a namespace URI, they would choose one starting with "". It's probably best to use more than just your domain name, as you might in future need to have more than one XML namespace.
It is sorta covered in the JavaRanch Style Guide.
subject: XML Namespace