my dog learned polymorphism
The moose likes XML and Related Technologies and the fly likes confusing xml construct Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "confusing xml construct" Watch "confusing xml construct" New topic

confusing xml construct

Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239

What is SOAP-ENV? AFAIK it's a namespace right? xmlns is some sort of declaring a namespace where SOAP-ENV has attribute envelope. but then again what about encodingStyle? how come that one attribute also has URI? aren't URI supposed to be owned by namespaces?
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

This is a namespace declaration. The namespace URI, which is the important piece of information, is "". Programs which process XML documents which include elements or attributes in this namespace may do some specific processing on those elements or attributes.

You can tell that it's a namespace declaration, and not an attribute, because it starts with "xmlns:".

The "SOAP-ENV" part of that declaration is the namespace prefix. It means that in this particular document any element or attribute whose name is prefixed by "SOAP-ENV:" belongs to the "" namespace. It's an arbitrary series of characters which only applies in the current document, and any other name could have been chosen. There is no significance in this series of characters apart from identifying the namespace which a name belongs to.

By now you should realize that this is an attribute which belongs to the "" namespace. Its name is "encodingStyle" and its value is "". As you know, attribute values are always string data. There is nothing which prohibits this string data from appearing to be a URI.
I agree. Here's the link:
subject: confusing xml construct
It's not a secret anymore!