=head1 NAME

XML::LibXML::Namespace - XML::LibXML Namespace Implementation

=head1 SYNOPSIS

  my $ns = XML::LibXML::Namespace->new($nsURI);
  print $ns->getName()
  print $ns->name()
  print $ns->prefix()
  $localname = $ns->getLocalName()
  print $ns->getData()
  print $ns->getValue()
  print $ns->value()
  print $ns->uri()
  $known_uri = $ns->getNamespaceURI()
  $known_prefix = $ns->getPredix()


=head1 DESCRIPTION

Namespace nodes are returned by both $element->findnodes('namespace::foo') or
by $node->getNamespaces().

The namespace node API is not part of any current DOM API, and so it is quite
minimal. It should be noted that namespace nodes are not a sub class of
XML::LibXML::Node, however Namespace nodes act a lot like attribute nodes, and
similarly named methods will return what you would expect if you treated the
namespace node as an attribute.

=over 4

=item B<new>

  my $ns = XML::LibXML::Namespace->new($nsURI);

Creates a new Namespace node. Note that this is not a 'node' as an attribute or
an element node. Therefore you can't do call all XML::LibXML::Node Functions.
All functions available for this node are listed below.

optionally you can pass the prefix to the namespace constructor. If this second
parameter is ommited you will create a so called default namespace. Note, the
newly created namespace is not bound to any docuement or node, therefore you
should not expect it to be available in an existing document.


=item B<getName>

  print $ns->getName()

Returns "xmlns:prefix", where prefix is the prefix for this namespace.


=item B<name>

  print $ns->name()

Alias for getName()


=item B<prefix>

  print $ns->prefix()

Returns the prefix bound to this namespace declaration.


=item B<getLocalName>

  $localname = $ns->getLocalName()

Alias for prefix()


=item B<getData>

  print $ns->getData()

Returns the URI of the namespace.


=item B<getValue>

  print $ns->getValue()

Alias for getData()


=item B<value>

  print $ns->value()

Alias for getData()


=item B<uri>

  print $ns->uri()

Alias for getData()


=item B<getNamespaceURI>

  $known_uri = $ns->getNamespaceURI()

Returns the string "http://www.w3.org/2000/xmlns/"


=item B<getPrefix>

  $known_prefix = $ns->getPredix()

Returns the string "xmlns"



=back

=head1 AUTHORS

Matt Sergeant, 
Christian Glahn, 
=head1 VERSION

1.55

=head1 COPYRIGHT

2001-2002, AxKit.com Ltd; 2001-2003 Christian Glahn, All rights reserved.

=cut
