Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xml namespace

 
Brij Garg
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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?

Thanks
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Brij Garg
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks

Why it is allowed to select any valid URI?
I think even parser does not look at the content of the URI.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic