class LibXML::XML::Namespace

The Namespace class represents an XML namespace. To add a namespace to a node, create a new instance of this class. Note that this does not assign the node to the namespace. To do that see the XML::Namespaces#namespace method.

Usage:

node = XML::Node.new('<Envelope>')
XML::Namespace.new(node, 'soap', 'http://schemas.xmlsoap.org/soap/envelope/')
assert_equal("<Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"/>", node.to_s)
assert_nil(node.namespaces.namespace)