def same_namespace?(node_1, node_2)
      args = [node_1,node_2]

      # CharacterData nodes shouldn't have namespaces. But in Nokogiri,
      # they do. And they're invisible. And they get corrupted easily.
      # So let's wilfully ignore them. And while we're at it, let's
      # ignore any class that doesn't know it has a namespace.
      if args.all? { |node| not node.is_namespaced? } or
         args.any? { |node| node.is_character_data? }
           return true
      end

      href1 = node_1.namespace_uri || ''
      href2 = node_2.namespace_uri || ''
      return href1 == href2
    end
def same_namespace?(node_1, node_2)
      args = [node_1,node_2]

      # CharacterData nodes shouldn't have namespaces. But in Nokogiri,
      # they do. And they're invisible. And they get corrupted easily.
      # So let's wilfully ignore them. And while we're at it, let's
      # ignore any class that doesn't know it has a namespace.
      if args.all? { |node| not node.is_namespaced? } or
         args.any? { |node| node.is_character_data? }
           return true
      end

      href1 = node_1.namespace_uri || ''
      href2 = node_2.namespace_uri || ''
      return href1 == href2
    end
Determine if two nodes are in the same effective Namespace

 @param [Node OR String] node_1 The first node to test
 @param [Node OR String] node_2 The second node to test