• 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

confusing xml construct

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic