Hello i have following XML
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" ... someID="ID123">
<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><endpoints>
...
Let’s say for some odd reason i have this attribute “someID” in the SOAP-ENV:Envelope root tag. Is it possible to read the content of that attribute with XSLT 1.0 (i want to have “ID123”)? If yes, how ?
Kind regards
Aleks
Maybe I am missing something, but this should be quite straight-forward. To get the value of the attribute on the SOAP:Envelope element, you can just do this
You would need to make sure the SOAP-ENV namespace prefix is defined in the XSLT though.
If you wanted to make it more generic, and not worry about what the root element (or namespace was), you could also do this
And if you were already positioned on the root element, it gets even simpler…