Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Why do we need xml namespaces for xml configuration to work?

 
Greenhorn
Posts: 3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean, why we don't just simple do this:

instead of
 
Marshal
Posts: 6971
471
Mac OS X VI Editor BSD Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to this url and explanation.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

The Spring XML configuration uses XML namespaces, which is good practice when you use XML. It allows tools like your IDE to understand what the XML means and check it against an XML Schema (XSD).

If you want to compare it to Java, namespaces are a little bit similar to packages in Java. And just like when you write a program in Java it's always a good idea to put your classes in a package, it's always a good idea to use namespaces when you work with XML.
 
Huynh Quang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your anwsers, sorry for the title but I don't know how to edit my post.
The special thing about Spring reference is I don't understand what they are talking about until I have some questions in mind and then reread it
 
Liutauras Vilda
Marshal
Posts: 6971
471
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Huynh Quang wrote:..., sorry for the title but I don't know how to edit my post.


No worries, I fixed typo for you, I hope you are fine with that. Apologies for not noticing that earlier
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!