code: private Properties getNamespaces(Node node)
     {
        Properties namespaces = new Properties();
        NamedNodeMap attributes = node.getAttributes();
        for (int i = 0; i < attributes.getLength(); i++)
        {
           Attr attribute = (Attr)attributes.item(i);
           if (attribute.getName().startsWith("xmlns:"))
           {
              namespaces.setProperty(attribute.getName().substring(6), attribute.getValue());
           }
        }
        return namespaces;
     }
docs: Returns the namespaces declared on the <code>node</code>.
  
  @param node
  a DOM node.
  @return the namespaces