Consider the following XML
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none" s:mustUnderstand="1">http://xmlns.scania.com/management/messages/v3</Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Data xmlns="http://xmlns.scania.com/management/schema/messages/v3">
<Details />
</Data>
</s:Body>
</s:Envelope>
I am trying to fetch the namespace value in xmlns value of the tag, under the Envelope. I tried using
XMLObject.value('namespace-uri((/*:Envelope)[1])', 'varchar(100)')
This returns the xmlns of the first element. i.e. "http://schemas.xmlsoap.org/soap/envelope/"
I need to drill down to the xmlns of the tag. i.e. "http://xmlns.scania.com/management/schema/messages/v3"
Could someone help me with this, please?