r0k3t
12-18-2008, 11:41 AM
So I have been doing some reading about namespaces, and there is something I don't really get so if someone could clear it up for me that would be great!
Lets take the example below, as many of you will recognize it is a SOAP document. Now, the root element is soap:Envelope right, makes sense cause I see the xmlns declaration in the element. It is the element called GetCategories that I don't understand... Why are they specifying the namespace like that? I mean, I have probably read an explanation of why but am being dense. Why does the namespace in that particular instance have no name associated with it, i.e. xmlns:soap, it is just xmlns.
Forgive me if these are elementary or obvious questions but I just am not putting it all together just yet.
Thanks
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetCategories xmlns="http://microsoft.com/webservices/" />
</soap:Body>
</soap:Envelope>
Lets take the example below, as many of you will recognize it is a SOAP document. Now, the root element is soap:Envelope right, makes sense cause I see the xmlns declaration in the element. It is the element called GetCategories that I don't understand... Why are they specifying the namespace like that? I mean, I have probably read an explanation of why but am being dense. Why does the namespace in that particular instance have no name associated with it, i.e. xmlns:soap, it is just xmlns.
Forgive me if these are elementary or obvious questions but I just am not putting it all together just yet.
Thanks
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetCategories xmlns="http://microsoft.com/webservices/" />
</soap:Body>
</soap:Envelope>