• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Namespaces in XML

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
I am very much confused bout the namescpaes. I know that(from some examples) namespace in XML is just to make the tags differee for same or diff xml files(am i right). If this is the case then why one have to write xsd as namespace for every element of XSD? I mean what is the need of that when the namespace five from namespace prefix "xsd", is alwayts the standard one(some org.xml url)?
Please explain it breifly.
Thnaks and regrds
Sandeep Jindal
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In fact, you don't need to add the prefix "xsd" for all XSD elements if you define the schema namespace as the default namespace (<schema xmlns="http://www.w3.org/2001/XMLSchema">). Of course then you would have to prefix all non-XSD elements with some namespace so that the parser won't try to find a "customer" element from the standard XSD schema and complain when it doesn't find such an element...
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps this will also help you, read for sure.
http://www.rpbourret.com/xml/NamespacesFAQ.htm
 
Sandeep Jindal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Balaji,
Your document really helped me. This document is very detialed though too long. I have read bout half the document and will read the rest soon.
Sir, can u please tell me the link whether i can find other general frequenly asked XML interview questions, or java questions.
Thanks and regards
Sandeep Jindal
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic