permaculture playing cards
The moose likes XML and Related Technologies and the fly likes xml namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml namespace" Watch "xml namespace" New topic

xml namespace

Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234

I am new to XML or better to say in the learning stage.
I need one clarification regarding namespace concept.

Purpose of namespace is to resolve the conflict between the xml elements.

xmlns is the attribute used for this purpose.

My doubt is regarding the URI given in xmlns attribute.
Can it be any valid resource?
Can it be any URI like valid resource from my own web application?

Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi there,

My understanding (and someone who is more of an XML guru will hopefully correct me if I am wrong) is that:

1.) Yes the URI given in xmlns attribute can be any valid resource.
2.) Yes it can be a URI valid resource from your own web application.

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234

Why it is allowed to select any valid URI?
I think even parser does not look at the content of the URI.
I agree. Here's the link:
subject: xml namespace
It's not a secret anymore!