File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes xml basic doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "xml basic doubt" Watch "xml basic doubt" New topic

xml basic doubt

aruna sydu
Ranch Hand

Joined: Jan 21, 2008
Posts: 98

Hi all,

I have a very basic question...please explain...

Whats is the difference between the targetNamespace attribute and the xmlns attribute declared when writing a xml document or and xsd.

Attitude Determines Altitude

Anila Mathew
Ranch Hand

Joined: Jun 16, 2004
Posts: 69


xmlns is an attribute which points to the namespaces of prefixes used in an xml document. It helps the XML parsers to lookup to the acutal location of the XML document which the prefix refers to.

targetNameSpace is used to allocate the XML document to any location outside the default namespace(

Let me know if this helps.


aruna sydu
Ranch Hand

Joined: Jan 21, 2008
Posts: 98


You cleared my question..
Thanks a lot...
I agree. Here's the link:
subject: xml basic doubt
It's not a secret anymore!