I see that the Element type has a method to GetNamespaces(), but this method isn't available on a Node type. How can I traverse a document and discover the namespaces on each node?
For example:
root, err := doc.DocumentElement()
fmt.Println(root.NodeType()) // ElementNode
root.GetNamespaces() // node.GetNamespaces undefined (type types.Node has no field or method GetNamespaces)
I'm at a bit of a loss for converting the root node (or any node) into something that I can call get namespaces on...
I see that the Element type has a method to
GetNamespaces()
, but this method isn't available on a Node type. How can I traverse a document and discover the namespaces on each node?For example:
I'm at a bit of a loss for converting the root node (or any node) into something that I can call get namespaces on...