aspose file tools*
The moose likes XML and Related Technologies and the fly likes what does xmlns represent in the xml file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "what does xmlns represent in the xml file?" Watch "what does xmlns represent in the xml file?" New topic
Author

what does xmlns represent in the xml file?

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

what does xmlns="http://mycompany.com/hr/schemas" represent here?




http://www.lifesbizzare.blogspot.com || OCJP:81%
Raghav Viswanathan
Greenhorn

Joined: Apr 26, 2012
Posts: 26

Hello Vishal,

Please refer to the post below.

what does xmlns mean


More precisely
--------------------------------------------------------------------------------------------------------------------

An XML namespace is declared using the reserved XML pseudo-attribute xmlns or xmlns:prefix, the value of which must be a valid namespace name.

For example, the following declaration maps the "xhtml:" prefix to the XHTML namespace:

xmlns:xhtml="http://www.w3.org/1999/xhtml"
Any element or attribute whose name starts with the prefix "xhtml:" is considered to be in the XHTML namespace, if it or an ancestor has the above namespace declaration.
--------------------------------------------------------------------------------------------------------------------
It is also possible to declare a default namespace. For example:

xmlns="http://www.w3.org/1999/xhtml"
In this case, any element without a namespace prefix is considered to be in the XHTML namespace, if it or an ancestor has the above default namespace declaration.

Attributes are never subject to the default namespace. An attribute without an explicit namespace prefix is considered not to be in any namespace.

--------------------------------------------------------------------------------------------------------------------

Please note that the above text is taken from Wiki Namspace declaration

Hope this helps

Thanks and regards,
Raghav.V


Better late than never.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what does xmlns represent in the xml file?