How can I use XPath query (or even XQuery) to get nampespace prefix declaration of a single element? I want to check if they get defined on more than 1 place.
For example, for the first element, it would be xmlns and xmlns:n, for the second only xmlns; for the first < n:int> it would be nothing, etc.
I can only find these I can get only namespaces in use, but not really what I'm looking for.
<?xml version="1.0" encoding="UTF-8"?>
<root>
<plus xmlns="http://lalaivana.me/calc/"
xmlns:n="http://lalaivana.me/numbers/" >
<n:int value="4"/>
<n:int value="5"/>
</plus>
<plus xmlns="http://lalaivana.me/calc/">
<int value="4" xmlns="http://lalaivana.me/numbers/" />
<int value="5"/>
</plus>
</root>