This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

confusing xml construct

 
Hendra Kurniawan
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is a namespace declaration. The namespace URI, which is the important piece of information, is "http://schemas.xmlsoap.org/soap/envelope/". 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 "http://schemas.xmlsoap.org/soap/envelope/" 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 "http://schemas.xmlsoap.org/soap/envelope/" namespace. Its name is "encodingStyle" and its value is "http://schemas.xmlsoap.org/soap/encoding/". As you know, attribute values are always string data. There is nothing which prohibits this string data from appearing to be a URI.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic