Win a copy of AWS Security this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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
 
Sheriff
Posts: 7619
522
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
Sheriff
Posts: 7619
522
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
 
He loves you so much! And I'm baking the cake! I'm going to put this tiny ad in the cake:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic