Every namespace binding that is "in-scope" is listed in the element's [in-scope namespaces] property.
Again, this is not just those declared.
You have to look at the differences between parent and child to see what has changed.
This property is only on elements.
The prefixes 'xml' and 'xmlns' are always defined:
xml → http://www.w3.org/XML/1998/namespace
xmlns → http://www.w3.org/2000/xmlns/
The document implicitly defines 'xml' and 'xmlns'.